Upload to Google Play

VoltBuilder can automatically upload your app to the Google Play Store at the end of your build. Uploaded apps are eligible for test or release.

There are a few additional setup steps to do in Google Play, but they only have to be done once.

Google updates the Play Store pages frequently. Check Google’s documentation for the latest updates.

Here’s how it works.

Set up your app in the Google Play Store

  1. Set it up as a normal listing. You can use an existing app already in the store.
  2. If it’s a new app, upload it to the store manually the first time to create the package name. In Google Play Console > Production > New release. You will see where to upload the app: API Access

    (To build without uploading, remove “googlePlayKey” and “googlePlayTrack” from voltbuilder.json, then build. You should then be able to download the .aab file.)

Get Google API Credentials

Tip: If you see Google Play Console or Google Developer Console in your local language, add &hl=en at the end of the URL (before any #…) to switch to English.

  1. Open the Google Play Console, All Apps view.
  2. Click the Setup menu entry, followed by API access.
  3. Click on Create New Project, then Google Play Android Developer. API Access

  4. Agree to Terms of Service (if needed)
  5. Click Create new service account (It’s about halfway down the page and not highlighted). It will tell you to go to Google Cloud Platform. Go there.
    1. Click the CREATE SERVICE ACCOUNT button at the top of the Google Developers Console
    2. For Service account name, enter VoltBuilder
    3. For Service account description, enter VoltBuilder API access
    4. Click on Create and Continue
    5. For role, choose Service Accounts (scroll down) > Service Account User.
    6. Click on Continue
    7. Click on Done
    8. A table with display with your new entry. Under Actions, choose Manage keys
    9. A new panel will appear. Click on ADD KEY, then Create new key
    10. A dialog box will appear Create private key for “VoltBuilder”. Select JSON as the Key type.
    11. Click CREATE to close the dialog and download the file. Save it to your project’s Certificates folder.
    12. Make a note of the file name of the JSON file downloaded to your computer. It will be something like api-8264238403641545035-843025-f2f055a01404.json (You can name it something else if you want: google.json is a good name.)
  6. Back on the Google Play Console, click DONE to close the dialog
  7. Click on Grant Access for the newly added service account
  8. You will now be on the Invite user page. Check that only the items in the Releases section are checked.
  9. Click on Invite user
  10. Click on Send invite
  11. You should now see your new user:
    Users and Permissions

Add App Permissions to the Credentials

  1. Get to the Users and Permissions screen in the Google Play Console.
  2. Click on your new user (voltbuilder@…)
  3. App Permissions will show. Select Add app
  4. Select your app and Apply
  5. Save changes
    Add App

Tell VoltBuilder about it

  1. VoltBuilder.json: Add these lines to your voltbuilder.json (substitute your values).
  "googlePlayKey": "certificates/google.json",
  "googlePlayTrack": "production",

Valid values for googlePlayTrack include internal, alpha, beta, and production. These correspond to Internal Test, Closed Testing, Open Testing, and Production in the Play Store. Each track can have one (or more) releases. A release is in draft mode until it’s promoted to complete by the developer. The Play Store has documentation which explains what state the Play Store needs to be in to upload to various tracks.

  1. Build Number: Each time you run, make sure android-versionCode has been incremented in config.xml. <widget android-versionCode="2" version="1.0.0" ...

Do a release build as usual. If the upload fails, VoltBuilder will return a message. Otherwise, your app will have been uploaded to the Google Play Store.

Refreshing your Credentials

If you get the message 'invalid_grant: Invalid JWT Signature.', you need to refresh your google.json file.

  1. Open the Google Cloud Console.
  2. Choose IAM & Admin.
  3. Click on Service Accounts.
  4. Click on the VoltBuilder account link.
  5. Click the KEYS tab.
  6. Click Add Key, then Create New Key.
  7. A dialog box will appear Create private key for “VoltBuilder”. Select JSON as the Key type.
  8. Click CREATE to close the dialog and download the file. Save it to your project’s Certificates folder.
  9. Make a note of the file name of the JSON file downloaded to your computer. It will be something like api-8264238403641545035-843025-f2f055a01404.json (You can name it something else if you want: google.json is a good name.)
Join Our Newsletter
Stay up to date on all of the latest news and updates for VoltBuilder