4

The header pretty much explains the issue. I'm getting "Unsatisfied link error" on emulator. What could be the cause and what are the possible solutions?

Some time ago, when we started developing the app, it did work fine on emulator, and one day just stopped. It happened on at least two independent machines.

Ideas, anyone?..

Update: created a new emulator - same thing.

Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
  • don't you get any exceptions on the logcat? you should start following the logcat messages as soon as you start the launch of the app. it should display there some warnings/errors if it can load the native shared library.. – Ovidiu Latcu Nov 29 '11 at 09:31
  • @OvidiuLatcu: sorry, should have written the exception mesaage. Updated the question. – Violet Giraffe Nov 29 '11 at 09:34
  • @OvidiuLatcu: It's in the problem description, so it doesn't stand out. I'm getting "Unsatisfied link error" on emulator. – Violet Giraffe Nov 29 '11 at 09:41

2 Answers2

3

Problem solved! it appears, Android QUEMU emulator only supports ARM5 (APP_ABI:=armeabi), and my library was compiled with armeabi-v7a.

Update: the problem no longer exists.

Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
1

You should check the following :

  1. Using adb shell go in to the sys/lib/ folder and check if your library was copied there
  2. Did you change the package of your class or did some refactoring? If you did and didn't updated the .cpp file this is causing the unsatisfied link error.
  3. You can also try to manually load your library using System.loadLibrary("myLib");
  4. You could also try to create a new emulator, maybe it got messed some how. Happens a lot.
Ovidiu Latcu
  • 71,607
  • 15
  • 76
  • 84
  • Of course, I am using `System.loadLibrary` - and getting this error on emulator, but not on real device. The library is integrated into APK fine. As for your 4th suggestion - thanks, will try, but I doubt it is the case since two dev PCs got this issue simultaneously, starting at the same moment. – Violet Giraffe Nov 29 '11 at 09:56
  • Tried recreating emulator - no luck. – Violet Giraffe Nov 29 '11 at 11:07