Fatal Exception: java.lang.UnsatisfiedLinkError dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.myapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libnative.so"
It only happens on the ARM64 devices. I don't setup any custom NDK build in my gradle setting.
Looks like Android Studio somehow messing up the correct folder to copy the .so file.
How does the happen and how to fix it?
Maybe you're using another library that does embed .so files for arm64-v8a? Open your APK as a zip file and look inside the lib folder to see if that's the case.
Then, to fix your issue, you can use abiFilters to include only .so files for the architectures you fully support:
android {
....
defaultConfig {
....
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With