アセット配信をテストする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このガイドの手順に沿って、アセットパックを取得するための Play Asset Delivery の統合をテストします。
ローカルテスト
Play Asset Delivery を使用すると、bundletool
でゲームの新しいバージョンをインストールしてローカルテストを行うことができます。ローカルテストを使用すると、Google Play サーバーにゲームをアップロードする必要がないため、短いサイクルでテストを繰り返すことができます。必要な手順は、Java、ネイティブ、Unity のどれで開発しているかによって異なります。
Java またはネイティブ
ローカルでアプリをテストする手順は次のとおりです。
App Bundle をビルドします。
--local-testing
フラグを使用して APK を生成します。
java -jar bundletool-all.jar build-apks --bundle=path/to/your/bundle.aab \
--output=output.apks --local-testing
デバイスを接続し、bundletool
を実行して APK をサイドローディングします。
java -jar bundletool.jar install-apks --apks=output.apks
Unity
Unity エディタで、[Google] > [Build and Run] の順に選択します。
動作
アプリのインストール中に install-time
パックがインストールされます。
fast-follow
パックは、on-demand
パックのように動作します。つまり、ゲームがサイドローディングされたときに自動的に取得されることはありません。デベロッパーがゲームの開始時に手動でリクエストする必要があります。アプリのコードを変更する必要はありません。
制限事項
ローカルテストには以下の制限があります。
- パックは Play ではなく外部ストレージから取得するため、ネットワーク エラーの場合のコードの動作はテストできません。
- Wi-Fi 接続を待つシナリオはローカルテストの対象外です。
- アップデートはサポートされません。新しいバージョンのビルドをインストールする前に、前のバージョンを手動でアンインストールしてください。
内部アプリ共有を使用したテスト
リリース候補の提供に近づいたら、本番環境でも問題なく動作するように、できるだけ現実的な設定でテストします。これを検証するには、内部アプリ共有を使用して、共有可能なリンクを取得します。このリンクを使用すると、Play ストアに公開されたゲームをユーザーがダウンロードするのとまったく同じ動作で、Play からダウンロードできます。
内部アプリ共有を使用したアセット配信は次の手順でテストします。
- App Bundle をビルドします。
- アプリを内部で共有する方法の Play Console の手順に従います。
- テストデバイスで、アップロードしたアプリのバージョンの内部アプリ共有リンクをクリックします。
- リンクをクリックして表示された Google Play ストアのページからアプリをインストールします。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Test asset delivery\n\nUse the steps in this guide to test how your app integrates Play Asset Delivery\nto retrieve asset packs.\n\nLocal testing\n-------------\n\nPlay Asset Delivery supports local testing by installing a new version of the\ngame using [`bundletool`](/studio/command-line/bundletool). Use local testing\nfor quick, iterative cycles as it avoids the need to upload the game to Google\nPlay servers. The steps you need to take depend on whether you're\ndeveloping in Java, native, or Unity.\n\n- [Java](#steps-native-java)\n- [Native](#steps-native-java)\n- [Unity](#steps-unity)\n\n### Java or native\n\nFollow these steps to test your app locally:\n\n1. [Build your app bundle](/guide/playcore/asset-delivery#next-step-instructions).\n\n2. Generate APKs with the `--local-testing` flag:\n\n ```\n java -jar bundletool-all.jar build-apks --bundle=path/to/your/bundle.aab \\\n --output=output.apks --local-testing\n ```\n3. Connect a device and run `bundletool` to sideload the APKs:\n\n ```\n java -jar bundletool.jar install-apks --apks=output.apks\n ```\n\n### Unity\n\nIn the Unity Editor, select **Google \\\u003e Build and Run**.\n\n### Behavior\n\n`install-time` packs will be installed during the app installation process.\n\n`fast-follow` packs behave as `on-demand` packs. That is, they won't be\nautomatically fetched when the game is sideloaded. Developers need to request\nthem manually when the game starts; this does not require any code changes in\nyour app.\n\n### Limitations\n\nThe following are limitations of local testing:\n\n- Packs fetch from external storage instead of Play, so you cannot test how your code behaves in the case of network errors.\n- Local testing does not cover the wait-for-Wi-Fi scenario.\n- Updates are not supported. Before installing a new version of your build, manually uninstall the previous version.\n\nTesting with internal app sharing\n---------------------------------\n\nAs you get closer to having a release candidate, test\nyour game using as realistic a configuration as possible to make sure that your game will perform\nwell for your users in production. To validate this, you can use\n[internal app sharing](https://support.google.com/googleplay/android-developer/answer/9303479)\nto get a sharable link that you can use to download the game from Play while\ngetting the exact same behaviour as your users will once the game is\npublished to the Play Store.\n\nTo test Asset Delivery using internal app sharing, do the following:\n\n1. Build your app bundle.\n2. Follow the Play Console instructions on how to [share your app internally](https://support.google.com/googleplay/android-developer/answer/9303479).\n3. On the test device, click the internal app-sharing link for the version of your app you just uploaded.\n4. Install the app from the Google Play Store page you see after clicking the link."]]