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 Answers
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

- 11,422
- 8
- 28
- 49
-
4thanks! seems like it is only doable if you already have your APK published on the play store but in my case, I have many APK flavors of the same app that are not intended to be published, like the QA flavor, so, I think is not possible to use this feature for those cases. – dicarlomagnus May 13 '21 at 17:27
-
@dicarlomagnus I have not tried yet but according to the docs it seems to me that your app does not have to be published to PlayStore but at least be published to internal / testing tracks. – shoheikawano May 14 '21 at 13:56
-
@shoheikawano that's a good hint, but in order to do that, I need at least create a new app on the play console and publish an internal testing right? I', telling you this because I saw these 3 comments on the firebase console when I tried to link my QA app with the play console in order to use app distribution: To link this app, make sure: 1. The connected Google Play account is the app’s Owner or Account Admin 2. Both apps share the same package name 3. Your Google Play app is published – dicarlomagnus May 14 '21 at 19:10
-
2@dicarlomagnus I see. Yes, if you want to test your QA app with app bundle, and your QA app's package is different from the PlayStore-releasing app, then you need to create and register new app for your QA app on play console first, and publish your QA app bundle to internal testing in order to distribute your QA app bundle through FAD. – shoheikawano May 17 '21 at 14:35
-
1@shoheikawano for my case I couldn't do this, since to link the app with firebase your app needs to be published. (not on internal testing) – Omar Abdan Sep 19 '21 at 09:08
-
1@OmarAbdan Same situation here. Unless the flavor's review and publish to Closed Beta done, Firebase Distribution will not accept the test flavor's .aab file. It's such a huge waste of time to duplicate everything to publish to Closed Beta with it going through the review process PER FLAVOR to be able to upload to Firebase Distribution for testers. – jesobremonte Oct 13 '21 at 04:44
-
2Because of all the unnecessary effort of setting up a published Play Store app for each test flavor, our team will keep using .apks for all Firebase App distributions except for the actual production flavor that needs to go to Play Store. – jesobremonte Oct 13 '21 at 05:12
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.

- 490
- 4
- 12
-
11Unfortunately wrong. App bundles can break stuff if you are not aware of it. One real live example is a separate "change language" feature in the app. The app doesn't download any additional languages unless they are configured as additional languages in android. Therefore, manual language changes will fail or at least require modifications to the build.gradle file. Also, one should test if the app handles missing dynamic feature modules / install time modules correctly. – Alexander Hoffmann Dec 07 '20 at 13:56
-
there is a different way to test dynamic modules, you have to create a combined apk for that using adb bundletool. I don't think using aab for playstore will cause any kind of issue. – tronku Dec 08 '20 at 10:16
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

- 173
- 1
- 7
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 :)

- 22,056
- 10
- 114
- 167
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.

- 3,645
- 1
- 28
- 33
-
This fixed my problem, here is path: Project settings -> Integration -> Google Play – David Aug 08 '23 at 06:05