Quick answer: Check the pack’s delivery_type in its build.gradle. install_time packs are bundled at install; on_demand packs need a code request via AssetPackManager before files exist on disk.
You moved your game’s level data into a 400 MB asset pack to keep the base APK small. Install via Play internal testing — the game crashes immediately because the level data files aren’t found. The pack was supposed to ship with the install.
Three Delivery Types
Each asset pack in build.gradle declares a delivery type:
// level_data/build.gradle
apply plugin: 'com.android.asset-pack'
assetPack {
packName = "level_data"
dynamicDelivery {
deliveryType = "install-time" // or "fast-follow" or "on-demand"
}
}
- install-time: bundled with base APK. Files are on disk immediately after install.
- fast-follow: downloads automatically right after install (typically completes in seconds).
- on-demand: not downloaded until your code requests via AssetPackManager.
Mistyping the value silently defaults to on-demand on some Gradle versions — the pack ships but isn’t delivered without a code request.
Access from Code
Regardless of type, retrieve the pack’s install path:
import com.google.android.play.core.assetpacks.AssetPackManager;
AssetPackManager mgr = AssetPackManagerFactory.getInstance(context);
AssetPackLocation loc = mgr.getPackLocation("level_data");
if (loc != null) {
String path = loc.assetsPath();
// load level files from path
} else {
// pack not installed yet
mgr.fetch(Arrays.asList("level_data"));
}
For install-time packs, getPackLocation always returns non-null on a fresh install. For on-demand, it returns null until you call fetch and the download completes.
Testing the AAB
Don’t test via adb install with a single APK extracted from the AAB. The extraction collapses splits and asset packs aren’t correctly represented. Use:
- Play Console Internal App Sharing: upload AAB, get a link, install through Play.
- Internal testing track: more setup but matches production install flow exactly.
- bundletool:
bundletool install-apks --apks=app.apks --device-id=...after generating splits withbuild-apks --connected-device.
Diagnosing in Play Console
Play Console → App Bundle Explorer → your bundle → Asset Packs tab. Confirm:
- Each pack appears with the expected delivery type.
- File sizes look reasonable.
- Combined install-time size + base APK is under 200 MB compressed (Play’s initial download cap).
If a pack is listed as on-demand when you intended install-time, your gradle file is wrong — fix and re-upload.
Texture Compression Variants
If you ship texture compression variants (ASTC, ETC2), each variant becomes its own pack split delivered to compatible devices. The total bundle can be much larger than what any single device downloads, but make sure each variant’s files cover the same logical content.
Verifying
Install via internal testing on a fresh device. Boot the game. Check the pack’s files exist via adb:
adb shell run-as com.you.game ls files/asset_packs/level_data/
Files should exist immediately after install for install-time packs. If empty, the pack didn’t deliver — revisit delivery_type and testing method.
“AAB asset packs need correct delivery_type in gradle and proper Play install path for testing. Sideloaded APKs lie about pack behavior.”
Always test AABs through Internal App Sharing first — reveals pack delivery issues that adb install hides.