When you are about to release your Ionic app for Android, you have to create an APK or bundle that you can upload to the Google Play Developer console – which isn’t always easy.
If you have never done it before, the process can be a bit challenging since you also need to sign your app. Plus, if you want to make everything work in a continuous integration environment, you can’t rely on the UI of Android Studio.
Since some time now Android also recommends to upload an .aab Bundle file instead of the classic APK, but how do we generate this new kind of output?
An Android bundle is a new format of distributing your app, which basically is a wrapper around APKs. Android will install the right APK on a users device, and only include necessary data so potentially the download for a user could be smaller. For native Android you can also exclude certain parts of the app within the basic bundle and load them at a later time, however, at this time I’m not sure if we can embrace this within Ionic.
Anyway, we will go through all the steps you need to take in order to create a signed bundle directly from the command line today!
NOTE: I have added some line breaks to long command line statements. If your CLI complains, please put them on one line!
The full quick win with snippets is only available to Ionic Academy members.
Join now for
- Unlimited access to all quick wins
- Library of 40+ step-by-step video courses
- Support for Ionic questions via Slack & private community