Flutter APK greater than 100 MB

6,608

When building a release version of your app, consider using the --split-debug-info tag. This tag can dramatically reduce code size. For an example of using this tag, see Obfuscating Dart code.

Some of the other things you can do to make your app smaller are:

Remove unused resources
Minimize resource imported from libraries
Support a limited number of screen densities
Compress PNG and JPEG files

or

One way that i use to reduce my app size is to use;

flutter clean

before i run the build command;

flutter build appbundle --target-platform android-arm,android-arm64
Share:
6,608
Abu Saad Papa
Author by

Abu Saad Papa

Updated on December 07, 2022

Comments

  • Abu Saad Papa
    Abu Saad Papa over 1 year

    My android release apk size built using Flutter is around 150MB. I would like to upload this apk to the google play store but play store has a apk size limit of 100MB. In Android app development we create APK expansion files for such limit in steps shown in this link. Would like to know the steps in Flutter code to create and use similar expansion files and reduce the app size to below 100MB.

    Update This question is not related to large size of apk due to Flutter. The apk is huge because of the assets used in the app. Want to know the process of uploading such apps in Flutter. In native android development we have the option of expansion files as shown in the link. IS there a similar option for Flutter if not what is the process to upload such apps to google play store.

  • TheWanderer
    TheWanderer over 5 years
    5MB?? I assumed it'd be smaller vs Java/Kotlin because of it being natively-compiled and all that..
  • TheWanderer
    TheWanderer over 5 years
    @Matt sorry, native was the wrong word. I should've used direct. But native apps include an entire SDK, along with the more extensive Java base API.
  • Rémi Rousselet
    Rémi Rousselet over 5 years
    @TheWanderer The sdk of native apps is shipped directly with the OS. Not included in the apk.