Reputation: 66
In my app I'm using Android NDK to build libraries for armeabi-v7a, arm64-v8a, x86, and x86_64 ABI's. I'm uploading the libraries as a bundle to google play.
On some devices I'm getting the following error
Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/my-package-name-1/base.apk"],nativeLibraryDirectories=[/data/app/my.package.name-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libc++_shared.so"
I checked the content of the uploaded bundle and it definitely contains libc++_shared.so for the above mentioned ABIs.
It seems that the directory that is searched is incorrect "../lib/arm"
. I didn't add support for obsolete ABIs(mips, armeabi), but I don't remember that there was anything called "arm"
.
How could I fix this issue?
Update: Specifying the supported ABIs explicitly in gradle file didn't help. I again checked if libc++_shared.so is present inside of the bundle file (for each ABI) before uploading it to play store, and again there were no files missing.
Another strange thing I noticed is that there are many crashes per user (+10/user). I find this a bit strange because without the libraries, the app cannot work (not even start). And if I would start an app that immediately crashes or doesn't work at all, I would uninstall it probably after the first unsuccessful try.
Thanks
Upvotes: 0
Views: 1111
Reputation: 719
Check if you jni builds are being copied to libs instead of jniLibs. if yes, copy content from libs to jniLibs.
Upvotes: 1