2

I find little to no information on what's the difference between these two

flutter build bundle
flutter build appbundle

When should I use one over the other?

Joel Broström
  • 3,530
  • 1
  • 34
  • 61

1 Answers1

8
flutter build appbundle

builds the 'app bundle' that is uploaded to the Google Play store. The app bundle is basically a bundle of apk files. When a user installs your app, Google Play will serve the optimal apk to the device. The app bundle is compressed into a aab file (Android app bundle).

flutter build bundle 

builds a special 'app bundle' archive from the list of assets in your pubspec.yaml that your app can read from at runtime. The builder places this in the flutter_assets folder in the build directory.

So basically they build different stuff. flutter build appbundle is pretty much unavoidable if you're building an app for release on the Play Store.

However, I have never needed to use flutter build bundle. I have never needed to build an individual assets folder as it's incorporated within an appbundle build.

Simon Hutton
  • 1,677
  • 3
  • 22
  • 35
  • 2
    Thank you. We were using `flutter build bundle` in our CI environment and I couldn't figure our why. To me it makes sense to build the actual app in CI and not just the asset directory (which takes about 30 seconds compared to 4 minutes). Thank you for confirming my suspicions about this confusing and undocumented topic! – Joel Broström Jun 24 '21 at 08:35
  • 3
    No probs. And thanks for replying (so many people don't bother) – Simon Hutton Jun 25 '21 at 14:12