I have an android APK that use a native library (snappydb
).
The native libraries takes a lot of spaces, so I want to keep only the snappydb
for armeabi-v7a architectures?
I know it's not 100% safe to remove snappydb
for other architectures, so my question is: how unsafe it is? (how many devices/users will I lost?)
Just for reference, the minimal sdk version that my app support is 16 (JELLY_BEAN).
I suggest using Gradle's productFlavors to produce different APKs per ABI, as some ABI may include some assembly code optimization (SSE4, SSE5, Arm Neon etc,)
android {
...
flavorDimensions "abi", "version"
productFlavors {
freeapp {
flavorDimension "version"
...
}
x86 {
flavorDimension "abi"
...
}
}
}
Or if you're using the experimental Gradle plugin
'com.android.tools.build:gradle-experimental:0.1.0'
android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
}
create ("x86-32") {
ndk.abiFilters += "x86"
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
// build one including all productFlavors
create("fat")
}
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