I'm publishing an app using the new app bundle format (aab). The app includes some native libraries for armeabi-v7a. When I install the app through Google Play on an arm64-v8a architecture it doesn't include native libraries for which there's no arm64-v8a so file.
According to this https://stackoverflow.com/a/39622499/534471, a armeabi-v7a library should run on an arm64-v8a device (and it works fine when installed through adb so it does work indeed).
The Google Play console shows the different apks by architecture, screen density etc. From the apk sizes I can clearly tell which ones don't include the native libraries. I also use a native libs monitor app to analyze the installed apk and it clearly doesn't include the native libraries I need (it includes arm64-v8a native libraries if the app has an arm64-v8a so file but not if there's only an armeabi-v7a version).
My gradle build file includes this small piece of code for bundle configuration:
bundle {
language {
enableSplit = false
}
density {
enableSplit = true
}
abi {
enableSplit = true
// include 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
Now here's my question: is there a way to tell the build tool to include the "next best" native library in each apk, next best being the closest version that would run on a specific architecture?
PS: If I set enableSplit = false for the abi then it will include the native library (as expected) but unfortunately for all platforms including x86 which alone is 20MB big...
For those who haven't seen how Google Play splits the app bundle into apks, here's a screenshot: