Skip to main content

Create Keystore file

To generate the APK, you need to create the Keystore file. Make sure to save this file to reuse other version upgrades.

There are 2 ways to create Keystore file:

1. Follow this manual guide
2. Use AppBuilder to automatically create **Keystore**.

_➡️_ **[Problem Internal Link]**

Steps:

On Mac/Linux, use the following command:

keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

On Windows, use the following command:

keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key

Note:

The keytool command might not be in your path—it’s a part of Java, which is installed as part of Android Studio. For the concrete path, run flutter doctor -v and locate the path printed after ‘Java binary at:’.

Then use that fully qualified path replacing java (at the end) with keytool. If your path includes space-separated names, such as Program Files, use platform-appropriate notation for the names. For example, on Mac/Linux use Program\ Files, and on Windows use "Program Files".

Ref: https://flutter.dev/docs/deployment/android#create-a-keystore