Flutter

How to generate signed APK for flutter in android studio

Hi developers, today we will learn how to generate a signed APK (Android Package Kit) or an AAB (Android App Bundle) file for our Flutter application.

During development, when we create an app, we usually test it by installing it on our devices. This installed version is a debug APK, which we can install and test repeatedly. However, when it comes to distributing the app through the Play Store, we need to upload a signed APK or AAB file because the Play Store doesn’t accept debug APKs.

To generate a signed APK or AAB file, you’ll need to follow these steps using Android Studio:

1- Open project in android studio.

2- Go to tools option and then Flutter and then Open Android module in Android Studio

build signed apk flutter
build signed apk flutter

3- One the android module is opened and code is compiled, Now you have to go to build option and select generate signed bundle or APK

build flutter apk
build flutter apk

4- Click on next

build signed apk flutter
build signed apk flutter

5- Select Create new.. option to generate new Signed key (When you release your app First Time)

signed apk flutter
signed apk flutter

6- Fill all options

Key store Path –

Path where your key store file i.e .jks file stored (as shown in above image). [Best way Select the path within your project directory.]

Key store password –

Enter password e.g. 123456

Key alias –

Enter Key alias (Name of .jks file) e.g. key

Key Password –

Enter Key password (Choose different password than Key store password) e.g. key123456

Validity(years) – Keep it as it is or change as per your requirements.

Certificate –

Fill certificate information (Not all fields are mandatory)

7- Then click OK and you will get following screen…

flutter build apk
flutter build apk

8- Select build variant – release

9- Click on finish and wait for a while until Gradle Build Running process complete.

And finally you will get the Generate Signed APK : (APKs) generated successfully . from that click on Locate option to get Location of your Generate Signed APK Key.

Please DO NOT lose the key and its all information i.e. Key store path,Key store password, Key alias and Key password (Best way write down it in to the note book or make text file and store on your drive while generating it.). Without this, you won’t be able to update your application because the new release will need to be signed with the same key.

Leave a Reply

Your email address will not be published. Required fields are marked *