Skip to main content

Build and upload the app bundle

Skip this page if Eluvio is building the app for you

Like customizing and signing, this is work on a developer's machine. If Eluvio is uploading builds on your behalf, skip to internal testing and start there once they confirm a build is uploaded.

Releasing to production stays with you either way, along with the store listing and declarations.

Google Play takes an Android App Bundle (.aab) — a signed, release build that Google turns into optimized installs for each device. This assumes your configuration and upload key are set up and the app runs on a real TV.

Build the release bundle​

  1. Bump VERSION_CODE in custom_build/config/custom.properties if this version code has ever been uploaded before.

  2. From the custom_build folder, run:

    ./build.sh

    Enter the keystore password when prompted, unless you saved it in signing.properties.

  3. Wait. A full build takes several minutes; most of that is shrinking and optimizing the release build.

Prefer Android Studio? Open the repo, switch the run configuration in the toolbar from app to custom-build, and press Run. It runs the same script, in Android Studio's terminal.

Android Studio's run configuration menu, with custom-build selected

When it finishes, custom_build/build_output/ holds three files:

FileWhat it is for
tv-release.aabThe one to upload to Google Play
tv-release.apkThe same release build as an installable APK, for sideloading
tv-debug.apkA debug build, installed under your package name plus .debug
Never upload a debug-signed bundle

If the build warned you it was signing with the Android debug keystore, the bundle cannot be uploaded — Google Play rejects it. Set up an upload key and rebuild.

Upload to the internal testing track​

Upload the first build to internal testing, not production. Internal testing skips review and reaches your testers within minutes, so you find problems before anyone else does.

  1. In Play Console, open your app, then Test and release → Testing → Internal testing.

  2. Click Create new release.

  3. The first time, you are asked to confirm Play App Signing. Accept Google's default: Google generates and holds the app signing key, and the key you built with becomes your upload key.

  4. Under App bundles, upload custom_build/build_output/tv-release.aab.

    Check the package name and version Play Console shows for the bundle. The package name must match the one you entered when creating the app, or the upload is rejected.

  5. Give the release a name (it defaults to the version name) and short release notes.

  6. Click Next. Play Console checks the release and lists any errors, warnings or messages.

  7. Click Save and publish (or Start rollout to Internal testing, depending on the Play Console version).

Warnings are not the same as errors

Play Console regularly lists warnings on a release — about missing deobfuscation files, native debug symbols, or setup tasks that are still incomplete elsewhere in the app. They do not stop an internal testing release. Errors do, and must be fixed before you can roll out.

Record the upload key fingerprint​

Once Play App Signing is set up:

  1. With your app selected, click Protected with Play in the left sidebar — the shield icon when the sidebar is collapsed.

  2. Expand Play Store protection (1), then click Manage Play app signing (2).

    Play Store protection, expanded, with Manage Play app signing marked

  3. The App signing page has a section for the App signing key and one for your Upload key. Click SHA-256 certificate fingerprint in each (1, 2) to copy it, and save both alongside your upload key's details.

    The App signing page, with the SHA-256 fingerprint of each key marked

If you ever need to confirm which key a build was signed with, or ask Google to reset a lost upload key, these are what you compare against.

Next​

Once the release is rolled out, test it via internal testing before submitting it.

Build or upload failing? See Troubleshooting.