Support app bundles with 32-bit and 64-bit binaries within them
Problem
>Warning > >This release is not compliant with the Play 64-bit requirement. > >The following APKs or App Bundles are available to 64-bit devices, but they have only 32-bit native code: {version code}. > >From August 1, 2019 all releases must be compliant with the Play 64-bit requirement. > >Include 64-bit native code in addition to 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives just the native code it needs. Learn More This warning appears when trying to publish an `aab` created by `flutter build appbundle` to the Play Store since today. Is this something that I need to worry about or will Flutter automatically resolve this, i.e. is this already planned to be resolved in time?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Add 64-bit Support to Flutter App Bundle
The warning indicates that the app bundle being published contains only 32-bit native code, which is non-compliant with the Play Store's requirement for 64-bit support. This occurs because the Flutter build process may not be configured to include 64-bit binaries, leading to the absence of necessary native libraries for 64-bit devices.
Awaiting Verification
Be the first to verify this fix
- 1
Update Flutter SDK
Ensure that you are using the latest version of the Flutter SDK, as updates may include support for 64-bit binaries. Run the following command to upgrade Flutter.
bashflutter upgrade - 2
Check Build Configuration
Verify that your Flutter project is configured to build both 32-bit and 64-bit binaries. Open your `android/app/build.gradle` file and ensure that the `ndk` block includes both architectures.
groovyndk { abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' } - 3
Rebuild App Bundle
After updating the SDK and checking the build configuration, rebuild your app bundle using the Flutter command. This will ensure that the new configurations are applied and both 32-bit and 64-bit binaries are included.
bashflutter build appbundle - 4
Test the App Bundle
Before publishing, test the generated app bundle to ensure it includes both architectures. You can use the `bundletool` to inspect the contents of the app bundle.
bashjava -jar bundletool.jar dump manifest --bundle=build/app/outputs/bundle/release/app.aab - 5
Publish to Play Store
Once you have confirmed that the app bundle includes both 32-bit and 64-bit binaries, proceed to publish the app bundle to the Play Store.
Validation
To confirm the fix worked, check the Play Console after uploading the app bundle for any compliance warnings. Additionally, verify that both 32-bit and 64-bit binaries are present in the generated app bundle using the `bundletool` command.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep