After changing minSdkVersion from 21 to 24, i'm receiving exception:
java.lang.UnsatisfiedLinkError: dalvik.system.DexClassLoader[DexPathList[[dex file "/data/user/0/com.test.testprint/files/nepcore.dex"],nativeLibraryDirectories=[/data/app/com.test.testprint-2/lib/arm, /data/resource/lib, /vendor/lib, /system/lib]]] couldn't find "libDeviceConfig.so"
After switching back to minSdk 21, everything back to work.
I also tried to add ndk filters, was not helpful :(
Can anybody help to understand how this exception connected with minSdkVersion?
Was needed to add one line in manifest file, inside application section :)
<application
...
android:extractNativeLibs="true">
For minSdk >= 23 and Android Gradle Plugin >= 4.2.0, need to use useLegacyPackaging in app's build.gradle file instead of extractNativeLibs in Androidmanifest.xml
Sample usage of DSL to package compressed native libraries (can be found here)
android {
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
}
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