1. Create a Keystore File (optional)

Create a Keystore file

For security reasons, Google needs a Keystore file to publish your app on Google Play. Bravo Studio offers three options:

  • Use Bravo Keystore (easiest option). Select this if you plan to use Bravo Studio for future app updates.

  • Create Keystore. Let Bravo create the file for you when you are publishing your app for the first time.

  • Upload Keystore. Use this option when you already have a keystore file.

Keep in mind: Save your keystore file somewhere safe (i.e.: Google Drive, Dropbox...). Google Play will need this specific file on future updates of your app.

If you lose this file you will need to publish a new app with a new package name and a new keystore. In order to transition existing users to the new app, youโ€™ll need to update the original appโ€™s description with a link to the new app and unpublish the original app.

The easiest option is to generate the Keystore in Bravo Studio

  1. Go to Publish -> Android

  2. Select Create Keystore

Here, you'll need to define a Key Alias, and create a Keystore Password. You should store this information somewhere safe.

You'll be able to download your new Keystore on the History tab. Your Keystore will be also sent to you by email.

After doing that, you can follow the next steps to get the AAB (Android App Bundle) as indicated here.

For the next times you request an AAB bundle, you'll need to choose the Upload Keystore option, and fill in the parameters (Key Alias and Password) you chose when generating it.

Option 2 - Create the Keystore via Android Studio

1. Download and install Android Studio: https://developer.android.com/studio

2. We will need to create an empty Android Studio project to access the keystore generator tool (if you happen to have any Android Studio project already created, open it and skip to step 6).

Open Android Studio, and you will see the screen below. Click on "Start a new Android Studio project".

3. Select "No Activity" and click "Next" button

4. Click "Finish"

5. Android Studio will create an empty project and you will see the screen below. Then, Android Studio will perform some tasks that will take some time (up to 5 minutes). Wait until nothing is displayed at the bottom part of the screen, where the message "Gradle: Build..." is shown in the screenshot below. Do not worry, you will not touch any of that ugly code :D #nocode

6. Once Android Studio finishes its tasks, go to the top menu option "Build" and click "Generate Signed Bundle / APK":

7. In the next screen, select "Android App Bundle" and click "Next" button:

8. Click "Create new..." button:

9. You will need to enter all the information in this screen. First, click the right icon inside "Key store path" to select the name and path of your keystore file. For example, "yourname.keystore" and select Desktop in "Where". Click "Save" button

10. Enter a Password for your keystore, an Alias, and a Password for your Alias. Make sure you keep these three values: Key store Password, Key Alias, and Key Store Alias. These three values, in addition to the generated Keystore file, will need to be uploaded in Bravo Studio.

In the "Certificate" section, complete at least one of the fields. For example, "First and Last Name". Click "OK" button and a new keystore field will be generated with the filename you chose in the previous step ("yourname.keystore") in the location you selected ("Desktop")

11. All set! You can click Cancel and close Android Studio now. Again, have the keystore file and these three values ready for uploading them to Bravo Studio: Key store Password, Key Alias, and Key Store Alias.

Remember to keep your keystore file somewhere safe (I.e.: Google Drive, Dropbox...). Future updates to your app need to use the same keystore file.

Option 2: Using Terminal on MacOS (advanced)

  1. You will need a Java Runtime Environment (Oracle or OpenJDK) and Android SDK for this tutorial. Open Terminal and run these two commands to check if you have both installed:

    java -version

    • If not installed, you will get this message or similar: "No Java runtime present, requesting install". If a popup window shows up, you can close it

    • If installed you will see your installed version number

      adb version

    • If not installed, you will get "adb: command not found"

    • If installed, you will see your version number

  2. If you don't have Java and Android SDK installed, it is recommended to download and install Android Studio, since it includes both Java OpenJDK and Android SDK: https://developer.android.com/studio

    Make sure you move it to the Applications folder. You don't need to open it after install it, since all the process will be done using Terminal. If any Android Studio window opens, you can close it.

  3. We will need JAVA_HOME and ANDROID_HOME environment variables configured. If you come from Step 1, you might already have these variables set. Confirm it with echo command. If they don't exist or if you come from Step 2, you need to set environment variables. Consider if any of the paths contains a space, it must be quoted with backslashes. E.g. /Applications/Android Studio/Contents should be entered as /Applications/Android \Studio/Contents

    Run in terminal:

    export JAVA_HOME=/Applications/Android\ \Studio.app/Contents/jre/jdk/Contents/Home

    To check that JAVA_HOME has been set correctly, run in terminal

    echo $JAVA_HOME

    and you should see the path /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home

    Run in terminal (replacing the value of ):

    export ANDROID_HOME=/Users*/<your_username>*/Library/Android/sdk

    To check that ANDROID_HOME has been set correctly, run in Terminal

    echo $ANDROID_HOME

    and you should see the path you just introduced /Users//Library/Android/sdk

  4. From Terminal, generate your keystore, which will be used to sign your app (you can choose different names for my-release-key.keystore and my-key-alias, but then make sure you use them for all the next steps):

    keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

    It will prompt you to enter several information:

    • Keystore password

    • Re-enter Keystore password

    • First and last name

    • Name of your organizational unit

    • Name of your organization

    • Name of your city or locality

    • Name of your state or province

    • Two-letter country code

    • Confirm the info you entered is correct by entering "yes"

    • Then you will need to enter a password for the my-key-alias (you can use the same as Keystore password)

    • Re-enter password for the my-key-alias

  5. Check that a new file was created. Run in Terminal:

    ls and you should see a file named my-release-key.keystore.

  6. All set! Keep the created file my-release-key.keystore in a safe place, and remember the passwords you introduced in the Step 4. You can now go to Bravo Studio and get your publishable package.

Remember to keep your keystore file somewhere safe (I.e.: Google Drive, Dropbox...). Future updates to your app need to use the same keystore file.

Last updated