UnsatisfiedLinkError when installing the app over the previous version

278 views
Skip to first unread message

Gulfas

unread,
Dec 15, 2012, 7:38:21 AM12/15/12
to andro...@googlegroups.com
Hello,

We are working on an update for our game, the game is mostly implemented in C/C++ but it doesn't use the NativeActivity mechanism, it's a JAVA activity calling native methods through JNI.

This new version of the game works well if it's installed on a device where the previous version of the game is not installed or was removed. However if we install the game on a device where the previous version was already installed we always get the following error:

12-14 13:16:14.260: W/dalvikvm(6041): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/sigames/fmh2013/PISDLIB;
12-14 13:16:14.260: D/AndroidRuntime(6041): Shutting down VM
12-14 13:16:14.260: W/dalvikvm(6041): threadid=1: thread exiting with uncaught exception (group=0x41b4f2a0)
12-14 13:16:14.265: D/ClockAlarmDataProvider(4291): getAlarm() - too many same ID alarm data. nCount: 0
12-14 13:16:14.265: D/KeyguardViewMediator(2266): setHidden false
12-14 13:16:14.265: E/AndroidRuntime(6041): FATAL EXCEPTION: main
12-14 13:16:14.265: E/AndroidRuntime(6041): java.lang.ExceptionInInitializerError
12-14 13:16:14.265: E/AndroidRuntime(6041):      at com.mycompany.mygame.mygame.onCreate(fmh2013.java:92)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.Activity.performCreate(Activity.java:5184)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.ActivityThread.access$600(ActivityThread.java:140)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.os.Handler.dispatchMessage(Handler.java:99)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.os.Looper.loop(Looper.java:137)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at android.app.ActivityThread.main(ActivityThread.java:4898)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at java.lang.reflect.Method.invokeNative(Native Method)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at java.lang.reflect.Method.invoke(Method.java:511)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at dalvik.system.NativeStart.main(Native Method)
12-14 13:16:14.265: E/AndroidRuntime(6041): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load pisdlib: findLibrary returned null
12-14 13:16:14.265: E/AndroidRuntime(6041):      at java.lang.Runtime.loadLibrary(Runtime.java:365)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at java.lang.System.loadLibrary(System.java:535)
12-14 13:16:14.265: E/AndroidRuntime(6041):      at com.mycompany.mygame.PISDLIB.<clinit>(PISDLIB.java:13)
12-14 13:16:14.265: E/AndroidRuntime(6041):      ... 15 more

It's very difficult to deduce what the problem is from this callstack. Is there any way to get more detailed information about the UnsatisfiedLinkError, for example why findLibrary returned null?

Any ideas?

Cheers,
Pablo

Eyal Zmora

unread,
Dec 15, 2012, 4:51:05 PM12/15/12
to andro...@googlegroups.com
Did you place your library under <PROJECT>/libs/armeabi?
Do you see it in your APK?

On Sat, Dec 15, 2012 at 2:38 PM, Gulfas <gul...@gmail.com> wrote:

Pablo Márquez

unread,
Dec 17, 2012, 5:40:22 AM12/17/12
to andro...@googlegroups.com
Hi,

The same APK works fine if I don't install it over a previous version of the game.

The problem only happens when I install the new version of my game (4.0.1) over the previous version (4.0). In this case I always get the unresolved link error.

However if I remove the old version of my game (4.0) and then install the new one (4.0.1), everything works fine. 

Unfortunately the error message from logcat doesn't tell me much.

Any ideas?
Cheers,
Pablo.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.



--
___________________________________________
Pablo Marquez - Mobile +44 (0) 77 10 59 77 22
pablo.mar...@yahoo.co.uk

ranausman540

unread,
Dec 22, 2012, 12:46:35 PM12/22/12
to andro...@googlegroups.com

Wath game update

On 17 Dec 2012 10:40, "Pablo Márquez" <gul...@gmail.com> wrote:

Hi,

The same APK works fine if I don't install it over a previous version of the game.

The problem only happens when I install the new version of my game (4.0.1) over the previous version (4.0). In this case I always get the unresolved link error.

However if I remove the old version of my game (4.0) and then install the new one (4.0.1), everything works fine. 

Unfortunately the error message from logcat doesn't tell me much.

Any ideas?
Cheers,
Pablo.




On Sat, Dec 15, 2012 at 9:51 PM, Eyal Zmora <eyal...@gmail.com> wrote:
>

> Did you place your l...

--
___________________________________________
Pablo Marquez - Mobile +44 (0) 77 10 59 77 22
pablo.mar...@yahoo.co.uk

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.

T...

Reply all
Reply to author
Forward
0 new messages