SQLCipher - Getting library loading error after system update - android

I've been testing my app for some time now without any problems. However, today I received a system update from T-Mobile on my myTouch 4G. My app, which uses SQLCipher now crashes on open with the following error:
01-23 20:43:37.200 E/AndroidRuntime(5534): FATAL EXCEPTION: main
01-23 20:43:37.200 E/AndroidRuntime(5534): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1312]: 1235 cannot locate 'ucol_strcollIter_4_2'...
01-23 20:43:37.200 E/AndroidRuntime(5534):
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.Runtime.load(Runtime.java:394)
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.System.load(System.java:534)
01-23 20:43:37.200 E/AndroidRuntime(5534): at info.guardianproject.database.sqlcipher.SQLiteDatabase.loadLibs(SQLiteDatabase.java:123)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.datamanagement.DatabaseManager.open(DatabaseManager.java:62)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.datamanagement.DatabaseManager.<init>(DatabaseManager.java:58)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.datamanagement.DataManager.establishDatabase(DataManager.java:45)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.service.MainActivity.onCreate(NoteEditorDialogActivity.java:44)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1960)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.access$1500(ActivityThread.java:145)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1045)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.os.Looper.loop(Looper.java:150)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.main(ActivityThread.java:4369)
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.reflect.Method.invoke(Method.java:507)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:846)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
01-23 20:43:37.200 E/AndroidRuntime(5534): at dalvik.system.NativeStart.main(Native Method)
I haven't tried reinstalling the app yet because I needed to preserve this error to debugging purposes but I'm sure it will fix this problem. I do, however, need to know why this error is happening and how I can prevent it so when I do publish the app, others won't experience this fatal crash.
Note: The system update seemed to be a minor one because I stayed on 2.3.4 before and after the update.

It seems you are missing depedency dlls (in your case 'ucol_strcollIter_4_2'....). Here is SO discussion regarding this error.

First, you should post this question to the SQLCipher Google Group: http://groups.google.com/group/sqlcipher
Second, are you using the final release of SQLCipher v1 aka 0.0.6 from November? https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipherForAndroid-SDK-0.0.6-FINAL.zip
I ask because it looks like you are having an issue that relates to linking against specific internal libraries, that was more common in earlier version of SQLCipher for Android.
Please try the "NoteCipher" app in the Android Market, and let me know if that works, as well, since it also includes SQLCipher.

Related

Android crash: Failed to initialize display event receiver

my application crashed when I start it again after closing it for quite some time. Below you can see the log that shows the error:
java.lang.RuntimeException: Failed to initialize display event receiver. status=-2147483648
at android.view.DisplayEventReceiver.nativeInit(Native Method)
at android.view.DisplayEventReceiver.<init>(DisplayEventReceiver.java:61)
at android.view.Choreographer$FrameDisplayEventReceiver.<init>(Choreographer.java:725)
at android.view.Choreographer.<init>(Choreographer.java:169)
at android.view.Choreographer.<init>(Choreographer.java:69)
at android.view.Choreographer$1.initialValue(Choreographer.java:95)
at android.view.Choreographer$1.initialValue(Choreographer.java:88)
at java.lang.ThreadLocal$Values.getAfterMiss(ThreadLocal.java:430)
at java.lang.ThreadLocal.get(ThreadLocal.java:65)
at android.view.Choreographer.getInstance(Choreographer.java:194)
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:487)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:235)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2892)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2304)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
I'm looking for the solution or at least someone with similar problem but surprisingly there is none.
Someone can help me?
Thank you!

Opening Second Aapp's Specific Activity

I have two applications App1 and App2 I want to open App2's Third activity from App1 and I want to pass some values between applications too. How can I do this.?
I have tried this:
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.example.aap2.MainActivity3");
startActivity(LaunchIntent);
But I am getting exception.
01-23 00:18:04.150: E/AndroidRuntime(5323): java.lang.IllegalStateException: Could not execute method of the activity
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View$1.onClick(View.java:2144)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View.performClick(View.java:2485)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View$PerformClick.run(View.java:9080)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.os.Handler.handleCallback(Handler.java:587)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.os.Looper.loop(Looper.java:130)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.ActivityThread.main(ActivityThread.java:3714)
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invoke(Method.java:507)
01-23 00:18:04.150: E/AndroidRuntime(5323): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
01-23 00:18:04.150: E/AndroidRuntime(5323): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
01-23 00:18:04.150: E/AndroidRuntime(5323): at dalvik.system.NativeStart.main(Native Method)
01-23 00:18:04.150: E/AndroidRuntime(5323): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invoke(Method.java:507)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View$1.onClick(View.java:2139)
01-23 00:18:04.150: E/AndroidRuntime(5323): ... 11 more
01-23 00:18:04.150: E/AndroidRuntime(5323): Caused by: java.lang.NullPointerException
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1374)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.Activity.startActivityForResult(Activity.java:2827)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.Activity.startActivity(Activity.java:2933)
01-23 00:18:04.150: E/AndroidRuntime(5323): at com.example.aap1.MainActivity1.one(MainActivity1.java:27)
The problem is here
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.example.aap2.MainActivity3");
here you have to pass the packagename but you are passing Activity name..that too the above will return the launcher Activity you have set in the manifest file..
For this you need to change your code like this..
Intent i = new Intent();
i.setClassName("com.example.aap2", "com.example.aap2.MainActivity3");
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
And set android:export="true" for MainActivity3 in Manifest.
Use
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.example.app2", "com.example.aap2.MainActivity3"));
//intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // Make sure this falg is really need.
startActivity(intent);
Useful resources
Allowing Other Apps to Start Your Activity
Interacting with Other Apps
You need to write Activity declaration into manifest as (for second app)
<activity android:name=".MainActivity3"
android:label="#string/app_name"
android:exported="true" >
// Add intent filter if any.
</activity>
Use this only if you don't know the Activity Name and don't pass activity name in it like you did
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.example.aap2");
Otherwise just simply try following method, the usual method to open another activity is
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.package.address","com.package.address.MainActivity"));
startActivity(intent);

How implement the mediation ad in android

I implement the mediation ad in android but it is not showing i use currently AdMob House Ads and Hunt Mobile Ads in Ad Network Mediation.
i implement both the xml and java coding way but neither work for me.
my xml code
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="#+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="6cd435789dcc43c0"
ads:loadAdOnCreate="true" />
and the log cat error is
01-23 19:13:10.079: E/Ads(1771): Cannot find adapter class 'com.huntmads.admobadaptor.HuntMadsAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
01-23 19:13:10.079: E/Ads(1771): java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.classForName(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:217)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:172)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.g.a(SourceFile:133)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.i.run(SourceFile:116)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.handleCallback(Handler.java:605)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 19:13:10.079: E/Ads(1771): at android.os.Looper.loop(Looper.java:137)
01-23 19:13:10.079: E/Ads(1771): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.NativeStart.main(Native Method)
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.NoClassDefFoundError: com/huntmads/admobadaptor/HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): ... 14 more
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-23 19:13:10.079: E/Ads(1771): ... 14 more
It sounds like you have the Admob package downloaded, but you need to also download the .jar file for the other types of ads. Google provides instructions for all mediated ads, and the specific download link for the Huntmads jar.

Getting strange exception while deleting sms from inbox

I am writing a project to delete sms from inbox.Most of the times it works fine,but sometime it gives strange exception.This is the stacktrace of exception:
01-23 16:41:20.016: E/AndroidRuntime(7328): FATAL EXCEPTION: main
01-23 16:41:20.016: E/AndroidRuntime(7328): android.database.sqlite.SQLiteException: error code 14: unable to open database file
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:146)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.content.ContentProviderProxy.delete(ContentProviderNative.java:503)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.content.ContentResolver.delete(ContentResolver.java:723)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.velosys.smsManager.Database.DatabaseHandlerRule.DeleteMessagesFromInbox(DatabaseHandlerRule.java:1441)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.velosys.smsManager.Database.DatabaseHandlerRule.deleteContactOnBasisOfTime(DatabaseHandlerRule.java:1375)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.velosys.smsManager.Activities.SplashActivity$2.run(SplashActivity.java:132)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.os.Handler.handleCallback(Handler.java:618)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.os.Handler.dispatchMessage(Handler.java:123)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.os.Looper.loop(SourceFile:351)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.app.ActivityThread.main(ActivityThread.java:3850)
01-23 16:41:20.016: E/AndroidRuntime(7328): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 16:41:20.016: E/AndroidRuntime(7328): at java.lang.reflect.Method.invoke(Method.java:538)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:659)
01-23 16:41:20.016: E/AndroidRuntime(7328): at dalvik.system.NativeStart.main(Native Method)
This is the line where i am deleting the sms from inbox and getting the exception:
l_contentResolver.delete(deleteUri, "address = ?" +" AND "+"date = ?",
new String[] {PhoneNumber,String.valueOf(DateandTime)});
This is the deleteUri:
Uri deleteUri = Uri.parse("content://sms");
This is l_contentResolver:
ContentResolver l_contentResolver = activity.getContentResolver();
I searched a lot about this exception but am not to figure out the reason for this in my code.Please help me.Thanks in advance.
I don't think that this is a problem in your code. If it only occurs in very few cases it is an error in the ContentProvider that manages the SMS.
Since the SMS API is not a public part of the Android API i don't think that there is some kind of documentation about this problems or a place to flag this as an Android Bug.
Maybe retry to delete the message a little bit later.

gralloc_goldfish(634): Emulator without GPU emulation detected

I am using android SDK 4.0.3 and I'm trying to run a simple program in which I'm trying to switch from one page to another page using an Intent (By passing intent object as: Intent intent = new Intent(getApplicationContext(),SecondActivity.class);
startActivity(intent); )
[Also, I have 3GB RAM]
but when I run the program it gives something like this in DDMS:
01-23 01:58:23.892: D/gralloc_goldfish(634): Emulator without GPU emulation detected.
01-23 01:58:45.482: D/AndroidRuntime(634): Shutting down VM
01-23 01:58:45.492: W/dalvikvm(634): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
01-23 01:58:45.532: E/AndroidRuntime(634): FATAL EXCEPTION: main
01-23 01:58:45.532: E/AndroidRuntime(634): android.content.ActivityNotFoundException:
Unable to find explicit activity class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity}; have you declared this activity in your AndroidManifest.xml?
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Activity.startActivityForResult(Activity.java:3190)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.example.actionbar_demo.Actionbar_demoActivity$1.onClick(Actionbar_demoActivity.java:23)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.view.View.performClick(View.java:3511)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.view.View$PerformClick.run(View.java:14105)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Handler.handleCallback(Handler.java:605)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Looper.loop(Looper.java:137)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 01:58:45.532: E/AndroidRuntime(634): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 01:58:45.532: E/AndroidRuntime(634): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 01:58:45.532: E/AndroidRuntime(634): at dalvik.system.NativeStart.main(Native Method)
01-23 01:58:49.173: I/Process(634): Sending signal. PID: 634 SIG: 9
If you're worried about the:
Emulator without GPU emulation detected.
I wouldn't be. Given that a cursory search of the net turns it up quite a bit, and it's not related to the specific problems being discussed, I'd say it's just an indication that your emulator simply doesn't emulate the GPU. It's unlikely to be a problem.
That's supported by the fact it's a debug message (not even a warning, let alone an error) and also that there's a big 42-second gap between that and your actual problem.
The actual problem seems to be indicated by the line:
01-23 01:58:45.532: E/AndroidRuntime(634):
android.content.ActivityNotFoundException: Unable to find explicit activity
class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity};
have you declared this activity in your AndroidManifest.xml?
So I have to ask: have you declared this activity in your AndroidManifest.xml?

Categories

Resources