How to make multiplatform flutter apk release or app bundle for playstore upload

Viewed 808

By multiplatform I mean arm64 and arm, using the default way of build a release apk it gives me an apk that works only on arm, but I can make an arm64 version by using the command

flutter build apk --release --target-platform --android-arm

The question is, how to make 1 apk for both platform or an app bundle that will work for play store?

3 Answers

I think is by using:

flutter build appbundle

Currently, if you're uploading an APK to the play store you need to upload multiple APKs for the architectures you're specifically targeting. You're able to create a "fat APK" which contains all the architectures however, it will increase the overall APK size.

As per the docs, it's recommended to use the app bundles as it will provide the required architecture depending on the device that downloads the app.

More info here: https://flutter.dev/docs/deployment/android

use this command in terminal ->flutter build apk --split-per-abi

Related