I have an asset pack which gets downloaded on-demand. Followed https://developer.android.com/guide/playcore/asset-delivery/integrate-java to integrate it. It is throwing an exception while trying to trigger download -
com.google.android.play.core.assetpacks.AssetPackException: -1: Asset Pack Download Error(-1): The requesting app is unavailable (e.g. unpublished, nonexistent version code). (https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackErrorCode.html#APP_UNAVAILABLE).
or sometimes
com.google.android.play.core.assetpacks.AssetPackException: -2: Asset Pack Download Error(-2): The requesting pack is unavailable. (https://developer.android.com/reference/com/google/android/play/core/assetpacks/model/AssetPackErrorCode.html#PACK_UNAVAILABLE).
I have tried installing application using bundletool
bundletool build-apks --bundle=path/to/your/bundle.aab --output=output.apks --local-testing
bundletool install-apks --apks=output.apks
This approach works fine. But how can I run application from Android Studio?