Tentang Android App Bundle
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Android App Bundle adalah format publikasi yang menyertakan semua kode
dan resource yang dikompilasi oleh aplikasi Anda, serta menangguhkan pembuatan dan penandatanganan APK ke Google
Play.
Google Play menggunakan app bundle Anda untuk membuat dan menyediakan APK yang dioptimalkan untuk setiap
konfigurasi perangkat, sehingga hanya kode dan resource yang diperlukan untuk
perangkat tertentu yang akan didownload untuk menjalankan aplikasi Anda. Anda tidak perlu lagi membuat,
menandatangani, dan mengelola beberapa APK guna mengoptimalkan dukungan untuk berbagai perangkat, dan
pengguna mendapatkan hasil download yang lebih kecil dan lebih dioptimalkan.
Sebagian besar project aplikasi tidak memerlukan banyak upaya untuk mem-build app bundle yang mendukung
penayangan APK yang dioptimalkan. Jika Anda sudah mengatur kode dan
resource aplikasi
sesuai dengan konvensi yang ditetapkan, build Android App
Bundles yang ditandatangani menggunakan Android Studio atau dengan menggunakan
command line, dan menguploadnya ke Google
Play, penayangan APK yang dioptimalkan akan menjadi
manfaat otomatis.
Saat menggunakan format app bundle untuk memublikasikan aplikasi, Anda juga dapat secara opsional memanfaatkan Play Feature Delivery, yang memungkinkan Anda menambahkan modul fitur ke project aplikasi.
Modul ini berisi fitur dan resource yang hanya disertakan dengan aplikasi Anda berdasarkan kondisi yang Anda tentukan, atau tersedia di lain waktu saat runtime untuk didownload Menggunakan Library Play Core.
Developer game yang memublikasikan aplikasinya dengan app bundle dapat menggunakan
Play Asset Delivery: Solusi Google Play
untuk menayangkan aset game dalam jumlah besar yang menawarkan metode pengiriman
fleksibel dan performa tinggi kepada developer.
Tonton video berikut untuk mengetahui ringkasan alasan Anda harus memublikasikan aplikasi
menggunakan Android App Bundle.
Batasan ukuran download terkompresi
Memublikasikan dengan Android App Bundle membantu pengguna menginstal aplikasi Anda dengan
hasil download sekecil mungkin dan meningkatkan ukuran download terkompresi.
Artinya, saat pengguna mendownload aplikasi Anda, ukuran total
APK terkompresi yang diperlukan untuk menginstal aplikasi Anda (misalnya, APK dasar +
APK konfigurasi) tidak boleh lebih dari 4 GB. Download berikutnya,
seperti mendownload modul fitur (dan APK konfigurasinya) on demand,
juga harus memenuhi batasan ukuran download terkompresi ini. Paket aset tidak
mengikuti batas ukuran ini, tetapi memiliki batasan ukuran lainnya.
Jika Konsol Play mendapati bahwa salah satu kemungkinan download aplikasi Anda atau fitur on
demand-nya melebihi batas ukuran maksimum, Anda akan menerima error.
Perhatikan bahwa Android App Bundle tidak mendukung file perluasan APK
(*.obb
). Jadi, jika Anda mendapati error ini saat memublikasikan app bundle, gunakan
salah satu referensi berikut untuk mengurangi ukuran download APK terkompresi:
- Pastikan Anda mengaktifkan semua APK konfigurasi dengan menetapkan
enableSplit = true
untuk setiap jenis APK konfigurasi. Tindakan ini memastikan
bahwa pengguna hanya mendownload kode dan resource yang diperlukan untuk menjalankan aplikasi
di perangkat mereka.
- Pastikan Anda mengurangi ukuran aplikasi dengan menghapus kode dan resource
yang tidak diperlukan.
- Ikuti praktik terbaik untuk
mengurangi ukuran aplikasi lebih lanjut.
- Pertimbangkan untuk mengonversi fitur yang digunakan oleh sebagian kecil pengguna Anda menjadi modul fitur yang dapat didownload oleh aplikasi Anda nanti, secara on demand. Perlu diingat bahwa hal ini mungkin memerlukan
pemfaktoran ulang aplikasi, jadi pastikan untuk mencoba saran lain yang dijelaskan
terlebih dahulu.
Pertimbangan lainnya
Berikut adalah masalah umum saat membuat atau menayangkan aplikasi
dengan Android App Bundle. Jika Anda mengalami masalah yang
belum dijelaskan di sini, laporkan bug.
- Penginstalan sebagian aplikasi yang di-sideload—yaitu aplikasi yang tidak diinstal menggunakan
Google Play Store dan tidak memiliki satu atau beberapa APK terpisah yang diperlukan—gagal di
semua perangkat bersertifikasi Google dan perangkat yang menjalankan Android 10 (API level 29) atau
yang lebih tinggi. Saat mendownload aplikasi Anda melalui Google Play Store, Google
memastikan bahwa semua komponen aplikasi yang diperlukan telah diinstal.
Jika Anda menggunakan alat yang secara dinamis mengubah tabel resource, APK yang dibuat
dari app bundle mungkin akan menampilkan perilaku yang tidak terduga. Oleh karena itu, saat membuat app bundle,
sebaiknya Anda menonaktifkan alat semacam itu.
Anda dapat mengonfigurasi properti dalam konfigurasi build modul fitur yang bertentangan dengan properti dari modul dasar (atau yang lainnya). Misalnya, Anda dapat menetapkan buildTypes.release.debuggable =
true
dalam modul dasar dan menetapkannya ke false
dalam modul fitur.
Pertentangan tersebut dapat menyebabkan masalah build dan runtime. Perlu diperhatikan bahwa, secara default, modul fitur mewarisi beberapa konfigurasi build dari modul dasar. Jadi, pastikan Anda memahami konfigurasi yang harus disimpan, dan konfigurasi yang harus dihapus, di konfigurasi build modul fitur.
Referensi tambahan
Untuk mempelajari Android App Bundle lebih lanjut, lihat referensi berikut.
Postingan blog
Video
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# About Android App Bundles\n\n| **Important:** From August 2021, new apps are required to publish with the [Android App Bundle](/guide/app-bundle) on Google Play. New apps larger than 200 MB are now supported by either [Play Feature Delivery](/guide/app-bundle/dynamic-delivery) or [Play Asset Delivery](/guide/app-bundle/asset-delivery). From June 2023, new and existing [TV apps are required to\n| be published as App Bundles](/docs/quality-guidelines/tv-app-quality#SC-E1).\n\nAn *Android App Bundle* is a publishing format that includes all your app's\ncompiled code and resources, and defers APK generation and signing to Google\nPlay.\n\nGoogle Play uses your app bundle to generate and serve optimized APKs for each\ndevice configuration, so only the code and resources that are needed for a\nspecific device are downloaded to run your app. You no longer have to build,\nsign, and manage multiple APKs to optimize support for different devices, and\nusers get smaller, more-optimized downloads.\n\nMost app projects won't require much effort to build app bundles that support\nserving optimized APKs. If you already [organize your app's code and\nresources](/guide/topics/resources/providing-resources#AlternativeResources)\naccording to established conventions, [build signed Android App\nBundles](/studio/publish/app-signing#sign-apk) using Android Studio or by [using\nthe command line](/studio/build/building-cmdline), and [upload them to Google\nPlay](/studio/publish/upload-bundle), then optimized APK serving becomes an\nautomatic benefit.\n\nWhen you use the app bundle format to publish your app, you can also optionally\ntake advantage of [Play Feature Delivery](/guide/playcore/feature-delivery),\nwhich lets you add *feature modules* to your app project.\nThese modules contain features and resources that are only included with your\napp based on conditions that you specify, or are available later at runtime for\ndownload [Using the Play Core Library](/guide/playcore).\n\nGame developers who publish their apps with app bundles can use\n[Play Asset Delivery](/guide/playcore/asset-delivery): Google Play's solution\nfor delivering large amounts of game assets that offers developers flexible\ndelivery methods and high performance.\n\nWatch the following video for an overview of why you should publish your app\nusing Android App Bundles. \n\nCompressed download size restriction\n------------------------------------\n\nPublishing with Android App Bundles helps your users to install your app with\nthe smallest downloads possible and increases the **compressed download size** .\nThat is, when a user downloads your app, the total size of\nthe compressed APKs required to install your app (for example, the base APK +\nconfiguration APKs) must be no more than 4 GB. Any subsequent downloads,\nsuch as downloading a feature module (and its configuration APKs) on demand,\nmust also meet this compressed download size restriction. Asset packs don't\ncontribute to this size limit, but they do have other [size restrictions](/guide/app-bundle/asset-delivery#size-limits).\n\nIf the Play Console finds any of the possible downloads of your app or its on\ndemand features to be more than the [maximum size limits](https://support.google.com/googleplay/android-developer/answer/9859372#size_limits), you will get an error.\n\nKeep in mind, **Android App Bundles do not support APK expansion (`*.obb`)\nfiles**. So, if you encounter this error when publishing your app bundle, use\none of the following resources to reduce compressed APK download sizes:\n\n- Make sure you [enable all configuration APKs](/studio/projects/dynamic-delivery#disable_config_apks) by setting `enableSplit = true` for each type of configuration APK. This makes sure that users download only the code and resources they need to run your app on their device.\n- Make sure you [shrink your app](/studio/build/shrink-code) by removing unused code and resources.\n- Follow best practices to further [reduce app size](/topic/performance/reduce-apk-size).\n- Consider converting features that are used by only some of your users into [feature modules](/studio/projects/dynamic-delivery#dynamic_feature_modules) that your app can download later, on demand. Keep in mind, this may require some refactoring of your app, so make sure to first try the other suggestions described.\n\nOther considerations\n--------------------\n\nThe following are known issues when building or serving your app\nwith Android App Bundles. If you experience issues that are\nnot already described here, [report a bug](https://issuetracker.google.com/issues/new?component=398856&template=1084213).\n\n- Partial installs of sideloaded apps---that is, apps that are not installed using the Google Play Store and are missing one or more required split APKs---fail on all Google-certified devices and devices running Android 10 (API level 29) or higher. When downloading your app through the Google Play Store, Google ensures that all required components of the app are installed.\n- If you use tools that dynamically modify resource tables, APKs generated\n from app bundles might behave unexpectedly. So, when building an app bundle,\n it is recommended that you disable such tools.\n\n- It is possible to configure properties in a feature\n module's build configuration that conflict with those from the base (or\n other) modules. For example, you can set `buildTypes.release.debuggable =\n true` in the base module and set it to `false` in a feature module.\n Such conflicts might cause build and runtime issues. Keep in mind, by default,\n feature modules inherit some build configurations from the base\n module. So, make sure you understand which configurations you should keep,\n and which ones you should omit, in your [feature module build\n configuration](/guide/app-bundle/configure#feature_build_config).\n\nAdditional resources\n--------------------\n\nTo learn more about Android App Bundles, consult the following resources.\n\n### Blog posts\n\n- [Building your first App Bundle](https://medium.com/androiddevelopers/building-your-first-app-bundle-bbcd228bf631)\n- [What a new publishing format means for the future of Android](https://medium.com/googleplaydev/what-a-new-publishing-format-means-for-the-future-of-android-2e34981793a)\n- [New features to help you develop, release, and grow your business on Google Play](https://android-developers.googleblog.com/2019/05/whats-new-in-play.html)\n- [The latest Android App Bundle updates including the additional languages API](https://android-developers.googleblog.com/2019/03/the-latest-android-app-bundle-updates.html)\n- [Patchwork Plaid --- A modularization story](https://medium.com/androiddevelopers/a-patchwork-plaid-monolith-to-modularized-app-60235d9f212e)\n- [Google Santa Tracker --- Moving to an Android App Bundle](https://medium.com/androiddevelopers/google-santa-tracker-moving-to-an-android-app-bundle-dde180716096)\n- [Developer tools on Play Console](https://medium.com/androiddevelopers/developer-tools-on-play-store-85fb710ee33b)\n\n### Videos\n\n- [Everything to know about Play App Signing](https://www.youtube.com/watch?v=odv_1fxt9BI)\n- [Building your first App Bundle](https://www.youtube.com/watch?v=IPLhLu0kvYw)\n- [App Bundles: Testing with Bundletool and the Play Console](https://www.youtube.com/watch?v=vAEAZPU7w-I)\n- [Customizable Delivery with the App Bundle and Easy Sharing of Test Builds](https://www.youtube.com/watch?v=flhib2krW7U)\n- [New Tools to Optimize Your App's Size and Boost Installs on Google Play](https://www.youtube.com/watch?v=rEuwVWpYBOY)"]]