App Bundles with Firebase app distribution

11.3k Views Asked by At

so currently we are exporting APK to the play store and we are using Firebase app distribution for our testing track but now we want to start using App bundles instead of APK but the issue here that Firebase app distribution does not support App bundles, I thought of deploying an APK for the testing track and then publish an App bundle for play store release, but I think there is a risk here since the app bundle is not tested and may contain undiscoverable issue, our options are to migrate the testing track to the internal app sharing in the play console, is there a way to make Firebase app distribution support App Bundles or any other options?

5

There are 5 best solutions below

2
On

That's actually the only way for now. You have to upload AAB to playstore and APK to app distribution. Using app bundle will not cause any kind of testing issues or undiscoverable problems. I have worked at two mass-scale product companies, both are using the same formats and haven't faced any issue.

0
On

The best solution I have for now is to use Bundletool to create a universal .apk from my app bundle.

For our team, it was necessary to do this, since we had a dynamic feature module with <dist:fusing dist:include="true"/>, so ./gradlew assemble would not include this module in the build.

The command in CI looks something like this:

java -jar bundletool-all-1.0.0.jar build-apks --bundle=PATH_TO_YOUR_BUNDLE_FILE --mode=universal --output=zip.apks --ks=PATH_TO_KEYSTORE_FILE --ks-key-alias=YOUR_KEY_ALIAS --ks-pass=pass:YOUR_KEYSTORE_PASSWORD

7
On

Update May 2021: This is now available with Firebase App Distribution! You have to link Firebase to your Google Play account and then distribute .aab files without problems

More info: https://firebase.google.com/docs/app-distribution/troubleshooting?platform=android#distribute-aabs

0
On

Firebase App Distribution supports Android App Bundles (AAB)

This is documented on Firebase Distribute Android apps to testers using the Firebase console, just click the AAB button.

This guide describes how to upload Android App Bundles (AABs) to App Distribution and distribute generated APKs using the Firebase console. To follow this guide, you'll need to have access to a Google Play account for which you're an Admin or Owner, and an app that's been published on the Play account.

Caution: When you register your app with Firebase, make sure to enter the same package name as the app you're distributing. The package name value is case-sensitive and cannot be changed for your app in Firebase after it's registered with your Firebase project.

PS: Just upload your App Bundle (with caveats). That's what I'm gonna do now :)

enter image description here

1
On

In case it helps anyone trying to add AAB support to Firebase Distribution:

I got the following error when enabling this option: App Bundle setup is incomplete. Follow the steps to set up your project for App Bundle uploads.

If you linked Firebase to Google Play, but didn't enable the AAB support option, you'll likely get a similar problem. I was able to fix this by unlinking and then linking again. This time making sure AAB support was enabled.