2

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? enter image description here

1

4 Answers 4

2

Try to hover on Flutter name in that list or click on arrow button then build apk then create your .apk file

Or run below command

flutter build apk --release

See below image:

image

See your apk here-> directory:\your_project_name\build\app\outputs\flutter-apk

Sign up to request clarification or add additional context in comments.

Comments

1

Flutter project consist of subprojects:

  • /MyProject
    • /iOS - (iOS subproject)
    • /android - (android subproject)

When I open project "MyProject" I see: enter image description here

But when I open android submodule/subproject "MyProject/android" I see another options under "Build":

enter image description here

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

1

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.

Comments

0

Open The Android Studio and also open your project.

First you click the build->Flutter->build APK.

Second you get the massage path.

Third you get the build folder then you click the build->app->outputs->flutter-apk->app-release.apk.

You can see the image for the 3 steps to Build Apk: enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.