In my project I had one native shared library for armeabi, mips, x86
and it worked fine on all devices (e.g. lib1.so). Now I added different native library and it has set of libraries for all of the architectures (armeabi, armeabi-v7a, arm64-v8a, mips, x86, x86_64
). E.g. lib2.so.
And it giving me java.lang.UnsatisfiedLinkError
on some of devices. For example it's trying to load from armeabi-v7a
but there isn't lib1.so for this cpu architecture.
How can I make it load differently for different libraries? Or maybe I can copy first lib1.so file to different architectures. But which folder should I copy to other folders?
You only need to add following to app gradle file
android {
defaultConfig {
ndk {
abiFilters "armeabi" , "mips", "x86 "
}
}
}