Search code examples
androidflutterapk

What's the difference between build and release in flutter?


Why the size of flutter build apk --release is larger than the size of flutter run --release which reduces the size by half. I need to get the leaner app size.


Solution

  • We should know that flutter run --release compiles only for a target ABI (because you run the generated APK directly to your device). while, flutter build apk --release results in a fat APK (Universal apk) that contains your code compiled for all the target ABIs, as a result, you could install this apk on any device.

    Flutter app can be compiled for

    • Armeabi-v7a (ARM 32-bit)
    • Arm64-v8a (ARM 64-bit)
    • x86-64 (x86 64-bit)