Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Android apk crashes on upgrade, works on uninstall old version/install new version — Gideros Forum

Android apk crashes on upgrade, works on uninstall old version/install new version

chipster123chipster123 Member
edited November 2012 in General questions
I'm getting run time error on Android when updating my application to a new version of .apk using the new 2012.09.2. By updating, I'm installing the new .apk on top of the existing .apk.

If I remove the previous version of the .apk and install the new version, it works. I lose all the saved data, but it works telling me that I've compiled the application correctly.

Here is the stack trace using logcat when it crashes
W/dalvikvm( 9397): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/giderosmobile/android/blockscheduleActivity;
W/dalvikvm( 9397): Class init failed in newInstance call (Lcom/giderosmobile/android/blockscheduleActivity;)
D/AndroidRuntime( 9397): Shutting down VM
W/dalvikvm( 9397): threadid=1: thread exiting with uncaught exception (group=0x41460300)
E/AndroidRuntime( 9397): FATAL EXCEPTION: main
E/AndroidRuntime( 9397): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 9397): 	at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 9397): 	at java.lang.Class.newInstance(Class.java:1319)
E/AndroidRuntime( 9397): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
E/AndroidRuntime( 9397): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2087)
E/AndroidRuntime( 9397): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2207)
E/AndroidRuntime( 9397): 	at android.app.ActivityThread.access$600(ActivityThread.java:139)
E/AndroidRuntime( 9397): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
E/AndroidRuntime( 9397): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 9397): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 9397): 	at android.app.ActivityThread.main(ActivityThread.java:4899)
E/AndroidRuntime( 9397): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9397): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 9397): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime( 9397): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
E/AndroidRuntime( 9397): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 9397): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gideros: findLibrary returned null
E/AndroidRuntime( 9397): 	at java.lang.Runtime.loadLibrary(Runtime.java:365)
E/AndroidRuntime( 9397): 	at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime( 9397): 	at com.giderosmobile.android.blockscheduleActivity.<clinit>(blockscheduleActivity.java:22)
E/AndroidRuntime( 9397): 	... 15 more
W/ActivityManager(  305):   Force finishing activity com.kosidoss.sched/com.giderosmobile.android.blockscheduleActivity
The original .apk was built with an older version of Eclipse SDK and Gideros 2012.8.* (can't remember the exact version)
The new .apk is being built with the 2012.09.2 and for Android 4.2

Any ideas?
Tagged:

Comments

  • chipster123chipster123 Member
    edited November 2012
    One thing I noticed is that the original installation created a symbolic link for the library
    /data/data/{myapp}/lib/libgideros.so -> /mnt/asec/{myapp}/lib/libgideros.so
    And the new .apk creates a concrete lib directory with a newer version of libgideros.so plus a whole lot more. When updating, it wasn't writing the new libraries through the symbolic link, so the other libraries were not being stored.

    UPDATE: this entry is wrong. Thy symbolic link gets removed and the new lib get created just fine. Something else is going wrong.
  • UPDATE: The actual error is the failure to resolve JNI_OnLoad
    D/dalvikvm( 3860): Trying to load lib /data/data/com.kosidoss.sched/lib/libgideros.so 0x41862020
    D/dalvikvm( 3860): Added shared lib /data/data/com.kosidoss.sched/lib/libgideros.so 0x41862020
    D/dalvikvm( 3860): No JNI_OnLoad found in /data/data/com.kosidoss.sched/lib/libgideros.so 0x41862020, skipping init
    D/dalvikvm( 3860): Trying to load lib /data/data/com.kosidoss.sched/lib/libluasocket.so 0x41862020
    D/dalvikvm( 3860): Added shared lib /data/data/com.kosidoss.sched/lib/libluasocket.so 0x41862020
    D/dalvikvm( 3860): Trying to load lib /data/data/com.kosidoss.sched/lib/liblfs.so 0x41862020
    D/dalvikvm( 3860): Added shared lib /data/data/com.kosidoss.sched/lib/liblfs.so 0x41862020
    D/dalvikvm( 3860): Trying to load lib /data/data/com.kosidoss.sched/lib/libggooglebilling.so 0x41862020
    Anybody else see this or have ideas?
Sign In or Register to comment.