问题
After following google's documentation about how to make an android app 64 bit compliant here, the android app bundle I've been trying to build still is not 64 bit compliant.
The android studio project contains different modules(apps) that have there own build.gradle file but all apps have a general build.gradle(Module:app) and the build.gradle project level. In the general build.gradle(Module:app) I added the following:
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
To the default config as per google documentation. I also tried adding the same code to the app's build.gradle(Module:app) and built the app bundle and here is how the lib files looks like
The gradle doesn't generate the x86_64 and arm64-v8a files that are necessary to make the app 64 bit compliant. I tried different combinations of where to put the abifilters for example, adding it only to the root build.gradle, adding it only to the app's build.gradle and also having the abifilters on both but it will not build the 64 bit support libraries.
The app is built in java and I was able to build a 64 bit app bundle by adding:
ndk {
abiFilters 'arm64-v8a', 'x86_64'
}
then analyzed the bundle and it had no lib folder and the google developer console warning was gone but how can I build both 64 bit and 32 bit support libraries for such a scenario?
回答1:
You need x86_64
and armb64-v8a
.so
files for 64 bit support. You can't build those in Android Studio. This is native libs.
The dependencies of the library that you are using must be rebuilt for these processor architectures.
来源:https://stackoverflow.com/questions/57358403/android-app-not-64-bit-compliant-after-adding-ndk-abifilters-armeabi-v7a-a