Why is the size of my app nearly doubled after upgrading Flutter from 1.5 to 1.7.4?
The code is same, however, the APK size increased from
7.6 MB to
I am using
flutter build apk.
Solution 1: creativecreatorormaybenot
This behavior is in response to this Play Store warning.
Flutter now includes 32-bit and 64-bit binaries in APKs built using
flutter build apk by default which effectively doubles the APK size as it is a fat APK which contains binaries for both ABIs.
There are two ways you can go about reducing your APK size again:
flutter build appbundle
This option is the preferred way for the Play Store as you are able to upload a single file (that will be
>14 MBin your case) and the Play Store then builds different APKs for every device from the App Bundle, which means that the download size of the APK will be around
flutter build apk --split-per-abi
This command will simply output two different APK files, one for 32-bit and one for 64-bit, each being about
7 MB. However, this means that you will have to upload multiple files to the Play Store if you are using that to distribute your application.