1. Create a Keystore File (optional)

Create a Keystore file

The first step to generate a publishable app bundle is generating a Keystore file.
You can choose to create your own Keystore file. Alternatively, you can use the Bravo Keystore to generate the bundle. If you choose this option, you can skip directly to the Get the AAB step.
Keep in mind: future updates of the same app must use the same Keystore. If you want to develop the same app independently from Bravo in the future, you would need to create your own Keystore to be able to update the app. If that's your case, choose one of the options described below to create your own Keystore file.
The easiest option is generating the Keystore inside the Bravo dashboard, in the Publish section. To do that, inside the Android publish section, choose Publication and select Create Keystore in the first step.
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 - Using 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

Option 2: Using Terminal on MacOS (Advanced)

  1. 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. 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. 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. 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. 5.
    Check that a new file was created. Run in Terminal:
    ls and you should see a file named my-release-key.keystore.
  6. 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.