attila
attila

Reputation: 1239

Build Bundle(s) / Apk(s) disabled

I'm trying to build a signed release APK but Build Bundle(s) / Apk(s) is grey. I've tryed with several project, also also reinstalled Flutter & Android Studio. Thanks for any ideas

Upvotes: 8

Views: 8568

Answers (4)

sarathi
sarathi

Reputation: 1069

It should work. But before you have to understood now main function run in chrome or any device run.

If you need android apk build go to

Tools-->enter image description here

Open an android module in android studio.

It will open another project in android studio. Then try it should work

Upvotes: 1

Kenosi Moetele
Kenosi Moetele

Reputation: 41

"Build Bundle(s) / Apk(s)" option is greyed out when you are viewing it from Project View on the navigation. You need to change to Android View. And to do that you go to Tools --> Flutter --> Open Android module in Android Studio.

You might need to restart android studio if files are not showing under Android view.

Upvotes: 4

Oleksandr
Oleksandr

Reputation: 1863

Tools>Flutter>Flutter Clean

after it Build Bundle(s)/Apk(s) button became active again

Upvotes: 2

Michael Pfaff
Michael Pfaff

Reputation: 1263

You can't do it from within Android Studio. You need to run flutter build apk in a terminal from within the project directory. Then you will find the apk in the build/app/outputs/apk/ directory. To have the apk be signed is a bit more difficult. For that, you'll need to setup apk signing from within the app level build.gradle. There are some good guides out there on how to do this. I'll link to one if I come across it again.

The Flutter website has a guide on how to do it. For security reasons, you should load the keystore credentials from a key.properties file and add it to your .gitignore.

Upvotes: 4

Related Questions