Reputation: 191
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.
Upvotes: 4
Views: 1894
Reputation: 971
As of now, there are three main CPU architectures used in Android smartphones.
flutter run --release
compiles only for your connected devices ABI (Application Binary Interface). So, you can install that apk only those devices that can matched with your device only.
flutter build apk --release
compiles for all architecture, that's why you can install your apk on any device or any CPU architectures.
Upvotes: 2
Reputation: 364
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
Upvotes: 4