I cannot build my project using Android Studio. I create project using console, then edit at VSCode. Now I open it at Android Studio and I cannot build release. Why this command Build bundles (green arrow) is not available?

-
docs.flutter.dev/deployment/androidlava– lava2022-02-28 17:25:48 +00:00Commented Feb 28, 2022 at 17:25
4 Answers
Flutter project consist of subprojects:
- /MyProject
- /iOS - (iOS subproject)
- /android - (android subproject)
When I open project "MyProject" I see:

But when I open android submodule/subproject "MyProject/android" I see another options under "Build":
So solution is:
If You want build Android package for Google Play store, You must open in IDE Android submodule, for example solder /MyProject/android
Case with Xcode, iOS and AppStore package looks similar - it is important to open iOS submodule, not whole MyProject.
Comments
For me, the easiest way is to use the Flutter CLI directly from your IDE's (or code editor's) terminal.
To build the app as an APK (.apk file):
flutter build apk
The command should generate this (for demonstration purposes):
√ Built build\app\outputs\flutter-apk\app-release.apk (app size here)
Usually used for a third-party deployment platform.
To build the app as an app bundle (.aab file):
flutter build appbundle
The command should generate this (for demonstration purposes):
√ Built build\app\outputs\bundle\release\app-release.aab (app size here)
Usually used for a widely acknowledged deployment platform (e.g., Google Play Store).
For a more detailed approach, please read: Build and release an Android app.
Note that I am using VS Code, but on Android Studio, you can also use this approach instead.


