Skip to content Skip to sidebar Skip to footer

Flutter How To Make Release Version In Android Studio?

By default Android Studio use debug mode when building Flutter application. You can build the release version with the command line, see How to optimize the Flutter App size? f

Solution 1:

You have to edit the run configuration:

Open the run configuration:

Open the run configuration

Add the --release flag:

Add the --release flag

Note that using the --release flag is not supported when you build with the Android Emulator.

Solution 2:

In Android Studio , click on :

>Run>Flutter Run 'main.dart' in Release Mode

enter image description here

Solution 3:

flutter build appbundle  --release --build-name=1.1.1 --build-number=3

Or you can run that in your Terminal, Remember to change build name and build number to corresponding values of your release app versioning.

Solution 4:

In Android Studio, open the existing android/ folder under your app’s folder. Then, select build.gradle (Module: app) in the project panel:

enter image description here

Next, select the build variant. Click Build > Select Build Variant in the main menu. Select any of the variants in the Build Variants panel (debug is the default):

enter image description here

The resulting app bundle or APK files are located in build/app/outputs within your app’s folder.

Solution 5:

The best way to make your apk for release mode is that open the project -> click on the android folder then make your apk as same as generated application build in android using your .jks key and alias password and name. this is the correct way for making apk in flutter.

Post a Comment for "Flutter How To Make Release Version In Android Studio?"