Currently I am building an apk from the terminal. The build end size shows 24.9MB. But when I open in build folder in Explorer it shows 56.9MB.
Steps used:
- flutter clean
- flutter build apk
Usually, the build size in the terminal will be the same as in Explorer. But now it shows double the size in Explorer. Please help.
2
Answers
Flutter builds two types of APKs: debug and release. The release APK, found in build/app/outputs/flutter-apk/app-release.apk, is smaller and optimized for production. The debug APK, the one displayed in file explorers, is larger due to features like hot reload and is intended for development and testing, not distribution.
check your release apk in the
or you can CTRL+click on the path in terminal and it will open that path in file explorer for you.
The app size of a debug build is large due to the debugging overhead that allows for hot reload and source-level debugging. As such, it is not representative of a production app end users download.
For the final release you can use the following command to generate APK or appbundle for release.
Appbundle:
APK:
The size of your application release decrease when it goes live in play store.
Read documentation: https://docs.flutter.dev/perf/app-size