4

My app is now using 2 native libraries, lets call them LibA and LibB. Previously my app was using only 1 native library (LibA) without problem.

  • LibA is only compiled for armeabi
  • LibB is compiled for armeabi, armeabi-v7a and x86.

which results in this structure in the apk when I unzipped to check:

  • appfolder/lib/armeabi/liba.so
  • appfolder/lib/armeabi/libb.so
  • appfolder/lib/armeabi-v7a/libb.so
  • appfolder/lib/x86/libb.so

Loading LibB via System.LoadLibrary("b") works fine.

However, loading LibA failed in Nexus 4 with UnsatisfiedLinkError.

When I delete "armeabi-v7a" and "x86" folders from LibB project, leaving only armeabi folder, both native libraries works fine.

I am guessing android tries to load libA from "armeabi-v7a" folder because the folder exist, but failed to find liba.so in it.

If my guess is true, how to prevent it?

I am rather new to native libraries in android. Thanks in advance!

user3162662
  • 743
  • 1
  • 7
  • 20
  • http://stackoverflow.com/questions/25645571/android-l-preview-does-not-search-native-libraries-in-armeabi-folder-unsatisf – Koesh Apr 21 '16 at 06:40
  • 1
    This could help too: http://ph0b.com/android-abis-and-so-files/ – Koesh Apr 21 '16 at 07:50

0 Answers0