Flutter APK greater than 100 MB
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
Abu Saad Papa
Updated on December 07, 2022Comments
-
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 over 5 years5MB?? I assumed it'd be smaller vs Java/Kotlin because of it being natively-compiled and all that..
-
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 over 5 years@TheWanderer The sdk of native apps is shipped directly with the OS. Not included in the apk.