I need to build an APK with Android Studio which need to be uploaded to Google Play. Google Play Complains about the APK not supporting x64. This is the Google Play Error Message after uploading the APK:
This release is not compliant with the Google Play 64-bit requirement.
The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: [1672]
Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code it needs. This avoids increasing the overall size of your app
I updated every dependency to the newest available one.
I added the following Code to the app/build.gradle
file:
within android
:
packagingOptions {
jniLibs {
setPickFirsts(Set.of('lib/x86/libc++_shared.so', 'lib/arm64-v8a/libc++_shared.so', 'lib/x86_64/libc++_shared.so', 'lib/armeabi-v7a/libc++_shared.so'))
}
}
within defaultConfig
:
ndk {
abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
}
After Analyzing my APK, it turns out that only the “x86_64” folder is missing, which is why Google Play Complains.
I would appreciate it, if someone could help me fix this issue.