You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Would like an article which explains how to reduce APK size #2183
A frequently asked question on our mailing lists is how to understand and reduce the size of ones Flutter-built APK.
A common misconception is judging the size of Flutter APKs built in --debug mode instead of --release. --debug apks are about 3x the size of --release APKs.
Note: flutter run defaults to --debug, however flutter build apk defaults to --release.
We have an FAQ explaining the size overhead in --release APKs, which is currently still larger than we'd like: https://flutter.io/faq/#how-big-is-the-flutter-engine
but I suspect we also need an article (on the website or otherwise) which explains the process of analyzing APK size and reducing it from a Flutter-specific perspective.
Another common confusion is .apk size (compressed) vs. .ipa size (uncompressed).
This is a very common confusion and we probably need at least some FAQ entries, if not a full on article to explain sizes in better detail. FYI @mit-mit
What is the link I should point people to when they think Flutter APKs are too large? (or when they file bugs like the above linked?)
What is the set of steps they should walk through to make sure their app is as small as possible?
e.g. make sure they're looking at --release
What tool should they use to understand where the space is going?
What compression tips/techniques should they be applying to their assets? What Apple/Android resources should they be linked to?
This is probably actually a medium article. At the time we seemed to be getting lots of these requests.
We get soooo many questions about this. We had another question from customer: amplify, who wanted to understand why Flutter was adding 20MB to their app. But there are lots of questions about that which an article could help with?
What does 20MB mean? Is it release? Debug? Is it compressed, uncompressed? Does that necessarily mean it's sent to users (or do the stores shard the app bundles)?
How do they look at the whole APK/IPA and understand what is contributing what?
What are reasonable expectations of how much Flutter should inflate your binary size?
We also got more related confusion on Gitter this morning:
"hey guys got a question, so when you compile an app with say flutter build app --release by default it produces an app that is compatible with armeabi-v7a, armeabi-v8a and others, my app goes to over 24Mb, my question is, when i upload this 24Mb app to google play, does play then decide which version goes to which specific device and reduce the download size to the usual s4-7Mb size>>??"
This is just a very common topic where more docs could help. :)
There was also a detailed analysis of Flutter's current APK size done internally in 2019 (go/flutter-apk-size), we unfortunately don't currently have a public (or 2021 updated) version of that, but I leave that here for later Googlers looking at this bug.
Activity
eseidelGoogle commentedon Apr 20, 2018
Another common confusion is .apk size (compressed) vs. .ipa size (uncompressed).
This is a very common confusion and we probably need at least some FAQ entries, if not a full on article to explain sizes in better detail. FYI @mit-mit
eseidelGoogle commentedon Apr 20, 2018
See also flutter/flutter#5571 flutter/flutter#12456 flutter/flutter#15170 flutter/flutter#11099 flutter/flutter#10717 flutter/flutter#9659
goderbauer commentedon Aug 1, 2018
/cc me
Hixie commentedon Jan 9, 2019
@eseidelGoogle Can you elaborate on what you would want such an article to say?
eseidelGoogle commentedon Jan 9, 2019
What is the link I should point people to when they think Flutter APKs are too large? (or when they file bugs like the above linked?)
What is the set of steps they should walk through to make sure their app is as small as possible?
e.g. make sure they're looking at --release
What tool should they use to understand where the space is going?
What compression tips/techniques should they be applying to their assets? What Apple/Android resources should they be linked to?
This is probably actually a medium article. At the time we seemed to be getting lots of these requests.
We can close this if @mjohnsullivan, @Sfshaza etc. track such ideas in other ways.
eseidelGoogle commentedon Jan 11, 2019
I see questions about size on Twitter/Reddit frequently. Another this morning:
https://twitter.com/android_sattout/status/1083683098682888192
eseidelGoogle commentedon Jan 22, 2019
Another user hit the --debug size gotcha: https://twitter.com/VDnewcastle/status/1087414701867167744
eseidelGoogle commentedon Jan 25, 2019
We get soooo many questions about this. We had another question from customer: amplify, who wanted to understand why Flutter was adding 20MB to their app. But there are lots of questions about that which an article could help with?
We also got more related confusion on Gitter this morning:
"hey guys got a question, so when you compile an app with say flutter build app --release by default it produces an app that is compatible with armeabi-v7a, armeabi-v8a and others, my app goes to over 24Mb, my question is, when i upload this 24Mb app to google play, does play then decide which version goes to which specific device and reduce the download size to the usual s4-7Mb size>>??"
This is just a very common topic where more docs could help. :)
eseidelGoogle commentedon Nov 30, 2021
There has been some progress on this. We now have better tooling around understanding APK size:
https://docs.flutter.dev/development/tools/devtools/app-size
There was also a detailed analysis of Flutter's current APK size done internally in 2019 (go/flutter-apk-size), we unfortunately don't currently have a public (or 2021 updated) version of that, but I leave that here for later Googlers looking at this bug.
sfshaza2 commentedon Feb 16, 2023
We now have the apk-size page. Closing.