{"id":39312,"date":"2019-09-19T16:44:32","date_gmt":"2019-09-19T21:44:32","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/appcenter\/?p=39312"},"modified":"2019-09-19T16:48:10","modified_gmt":"2019-09-19T21:48:10","slug":"using-the-android-app-bundle-with-visual-studio-app-center","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/appcenter\/using-the-android-app-bundle-with-visual-studio-app-center\/","title":{"rendered":"Using the Android App Bundle with Visual Studio App Center"},"content":{"rendered":"<p>You might have heard about the new official publishing format for your Android apps: The Android App Bundle. Originally announced at Google I\/O \u201818, this new format brings a host of new features and improvements for both you as a developer and your app\u2019s users.<\/p>\n<p>To get started it is important to recognize the Android App Bundle (or AAB for short) as a publishing format. It contains all resources and assets and binaries of your app for the respective publishing platform, i.e. the Play Store. You can\u2019t install it directly on your Android device, but it is used to generate optimized binaries tailored for specific devices, i.e. screen densities, CPU architectures and locales.<\/p>\n<p>This reduces both the download size of your app for most devices and the storage space your app consumes on the device.<\/p>\n<p>One of the challenges is that while the Android App Bundle brings a lot of benefits for users of the Play Store, these are not directly available for users of other platforms. At the same time, since August 2019, the Play Store only accepts binaries supporting 64-bit for new uploads, and given that an AAB typically results in smaller individual binaries distributed to your users, the size limit for AABs is a much more forgiving 150MB per individual APK as the regular 100MB for plain APKs.<\/p>\n<p>We\u2019ve <a href=\"https:\/\/github.com\/microsoft\/appcenter\/issues\/194\">heard you loud and clear<\/a> that being able to build and distribute AABs to supporting stores is important to you, and so we\u2019re happy to announce that Visual Studio App Center supports building AABs for all supported Android platforms (regular Java\/Kotlin, React-Native and Xamarin apps).<\/p>\n<h4>How to Build an AAB for your Android App<\/h4>\n<p>Building an Android App Bundle with App Center is straightforward and only requires one step:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-39313 size-full\" src=\"https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image.gif\" alt=\"\" width=\"730\" height=\"800\" \/><\/p>\n<p>Yes, that\u2019s it. There\u2019s a new switch in the build configuration of your Android app which allows you to build a bundle.<\/p>\n<p>However, there\u2019s a little more to it behind the scenes, of course. If our repository analysis detects that your app may use a bundle (i.e. through the bundle { \u2026 } block in your app\u2019s Gradle configuration) we will enable this option by default.<\/p>\n<p>In any case, what you select in the configuration will be respected, and if you chose to build a bundle, it will be built in addition to your regular APK.<\/p>\n<p>Keep in mind that AABs for submission to the Play Store must also be signed, so we\u2019re signing your AAB with the same key store and credentials as we\u2019re signing your regular APK with.<\/p>\n<p>If you look at the build\u2019s details, you can then download the bundle if you so wish:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-39314\" src=\"https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-4.png\" alt=\"\" width=\"661\" height=\"490\" srcset=\"https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-4.png 661w, https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-4-300x222.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/p>\n<h4>How to Distribute your AAB to the Store<\/h4>\n<p>So, you\u2019ve built your app as an AAB, either through App Center, or locally, or through another CI pipeline. Now, how do you get it into the Play Store?<\/p>\n<p>The simple answer here is you don\u2019t have to do anything extra. If your build contains a bundle as an artifact, and you\u2019re distributing it to a store which supports AAB (only Google Play as this time), App Center will automatically distribute the Android App Bundle.<\/p>\n<p>This applies both to automatic distribution when you configure it for your build \u2013 or when distributing manually to the store.<\/p>\n<p>In addition, when you configure distribution to the Play Store, but your app is not set up to produce an AAB, we will kindly let you know that AABs are preferred now:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-39315 size-full\" src=\"https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-5.png\" alt=\"\" width=\"855\" height=\"643\" srcset=\"https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-5.png 855w, https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-5-300x226.png 300w, https:\/\/devblogs.microsoft.com\/appcenter\/wp-content\/uploads\/sites\/3\/2019\/09\/word-image-5-768x578.png 768w\" sizes=\"(max-width: 855px) 100vw, 855px\" \/><\/p>\n<p>You can still distribute APKs to the store of course if you chose, and keep in mind that App Center Distribution Groups still use the regular APK when distributing to them.<\/p>\n<p>We\u2019re excited to hear your feedback and the use cases you find to make sure your app is optimized for everyone using the Android App Bundle. Happy building!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve heard you loud and clear that being able to build and distribute AABs to supporting stores is important to you, and so we\u2019re happy to announce that Visual Studio App Center supports building AABs for all supported Android platforms.<\/p>\n","protected":false},"author":33,"featured_media":39314,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-39312","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobiledev"],"acf":[],"blog_post_summary":"<p>We\u2019ve heard you loud and clear that being able to build and distribute AABs to supporting stores is important to you, and so we\u2019re happy to announce that Visual Studio App Center supports building AABs for all supported Android platforms.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts\/39312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/comments?post=39312"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts\/39312\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/media\/39314"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/media?parent=39312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/categories?post=39312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/tags?post=39312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}