The application crashes in the emulator when loading its own shared library, but works fine on the physical device

The heading pretty much explains the problem. I get an "Unsatisfied Link" error message on the emulator. What could be the reason and what are the possible solutions?

Some time ago, when we started developing the application, it worked perfectly on the emulator, and once it just stopped. This happened on at least two independent machines.

Ideas, who? ..

Update : create a new emulator - the same.

+4
source share
2 answers

The problem is solved! it seems that the Android QUEMU emulator only supports ARM5 ( APP_ABI:=armeabi ), and my library was compiled using armeabi-v7a .

Update: The problem no longer exists.

+3
source

You should check the following:

  • Using adb shell go to sys/lib/ folder and check if the library was copied there.
  • Have you changed your class package or refactored? If you made and did not update the .cpp file, this causes an unsatisfied link error .
  • You can also try manually loading your library with System.loadLibrary("myLib");
  • You can also try to create a new emulator, perhaps it is somehow confused. It happens a lot.
+1
source

Source: https://habr.com/ru/post/1383596/


All Articles