-1

I have some shared libraries, may be libaaa.so, libbbb.so, libccc.so.

  1. libaaa.so only compiled on armeabi ARCH
  2. libbbb.so compiled on armeabi and armeabi-v7a
  3. and libccc.so compiled on both ARCHs(x86, arm64, mips ...)

At present, i have to copy the libaaa.so into armeabi-v7a, arm64-v8a ... folders, otherwise, cashes will be raised.

How to avoid the extra copy?

Jerikc XIONG
  • 3,517
  • 5
  • 42
  • 71
  • 1
    Refer http://ph0b.com/android-abis-and-so-files/. From that page "There is a dead simple but not well-known important rule to follow when dealing with .so files. You should provide libraries optimized for each ABIs if possible, but it’s all in or nothing: you shall not mix. You have to provide the full set of the libraries you’re using in each ABI folder." So it seems that you will need to put your so files in all folders for different architectures. – human123 Nov 12 '15 at 07:41

1 Answers1

0

Use the System.load() instead of System.loadLibrary().

The difference had been discussed here.

Community
  • 1
  • 1
Jerikc XIONG
  • 3,517
  • 5
  • 42
  • 71