why flutter project files size is more then 500MB?

Viewed 337

Is it normal the size of flutter start app "counter app" is 125MB on Android Device, also the project files size is 543MB, the build file only is 508MB, I have a problem if anyone can help?

1 Answers

Flutter team acknowledges it https://github.com/flutter/flutter/issues/12456.

There's an explanation for this https://flutter.dev/docs/resources/faq#how-big-is-the-flutter-engine,

In August 2018, we measured the size of a minimal Flutter app (no Material Components, just a single Center widget, built with flutter build apk), bundled and compressed as a release APK, to be approximately 4.7MB.

For this simple app, the core engine is approximately 3.2MB (compressed), the framework + app code is approximately 840KB (compressed), the LICENSE file is 55KB (compressed), necessary Java code (classes.dex) is 57KB (compressed), and there is approximately 533KB of (compressed) ICU data.

Of course, YMMV, and we recommend that you measure your own app, by running flutter build apk and looking at build/app/outputs/apk/release/app-release.apk.

Also, the relative differences in apk size would likely be smaller with larger apps. Flutter's overhead size is fixed.

1)For reduce the size you can use. flutter clean 2)flutter build appbundle --target-platform android-arm,android-arm64 3) you can use proguard to reduce the size

Here is Official Android documentation that made my apps go From ~20mb To ~9mb

Try the Proguard recommendation

Link: https://developer.android.com/topic/performance/reduce-apk-size

Related