Télécharger les APK générés à l'aide de l'API Play Developer Publishing
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Vous pouvez télécharger tous les APK générés par Google Play à partir d'un app bundle que vous avez importé dans la Play Console à l'aide de la fonctionnalité APK générés dans l'API Google Play Developer.
Utiliser les APK générés
Voici un workflow de publication typique qui comprend le téléchargement des APK générés avant leur publication, quel qu'en soit le canal:
Créez une modification en appelant Edits: Insert et en spécifiant l'application à modifier.
Attribuez le bundle à un titre en appelant Edits.tracks: update.
Pour éviter de la publier auprès des utilisateurs finaux à ce stade, définissez l'état de la nouvelle version sur brouillon.
Validez la modification.
Téléchargez les APK générés à partir du bundle que vous avez importé à l'étape 2 à l'aide des méthodes des APK générés dans l'API.
Traitez les APK téléchargés.
Créez une modification comme vous l'avez fait à l'étape 1.
Faites passer la version brouillon en un déploiement par étapes ou complet en appelant Edits.tracks: update.
Validez la modification.
Créer votre répertoire APK
Si vous devez utiliser vos fichiers APK avec bundletool, procédez comme suit pour les compiler à l'aide de l'API Generated APK:
Lorsque vous appelez la méthode de liste des APK générés, la réponse contient un champ TargetingInfo pour chaque clé de signature. Écrivez cette valeur de champ dans un fichier nommé toc.json.
Téléchargez vos APK et placez-les dans un répertoire contenant le fichier toc.json créé à l'étape précédente. Notez que chaque APK téléchargé doit être nommé "DownloadId.apk", où DownloadId est l'ID utilisé pour télécharger l'APK à partir de la méthode de téléchargement des APK générés.
Vous pouvez désormais utiliser ce répertoire avec bundletool 1.15.2 ou version ultérieure.
Exemple : bundletool install-apks --apks /path/to/created/directory.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003eDownload all APKs generated by Google Play from your app bundle using the Generated APKs feature in the Google Play Developer API.\u003c/p\u003e\n"],["\u003cp\u003eA typical workflow involves uploading a bundle, assigning it to a track as a draft, downloading generated APKs, processing them, and then promoting the draft to a staged or full rollout.\u003c/p\u003e\n"],["\u003cp\u003eTo use generated APKs with bundletool, create a directory containing a toc.json file with TargetingInfo from the API response and downloaded APKs named using their DownloadId.\u003c/p\u003e\n"]]],["Generated APKs, from app bundles uploaded to Google Play Console, can be downloaded via the Google Play Developer API. The process involves creating an edit, uploading a bundle, assigning it to a draft track, and committing the edit. Then, the APKs are downloaded. Optionally, a new edit is created to promote the draft release, followed by another commit. To use APKs with `bundletool`, a `toc.json` file is generated and combined with the downloaded APKs in a directory, each named \"DownloadId.apk\".\n"],null,["# Download generated APKs using the Play Developer Publishing API\n\nYou can download all APKs that Google Play generated from an app bundle\nyou've uploaded to Play Console using the *Generated APKs* feature in the\n[Google Play Developer API](/android-publisher).\n\nHow to use generated APKs\n-------------------------\n\nA typical publishing workflow which includes downloading generated APKs before\nthey are released on any track would be the following:\n\n1. Create a new edit, by calling [`Edits: Insert`](/android-publisher/api-ref/rest/v3/edits/insert) and specifying the app you want to modify.\n2. Upload a bundle by calling [`Edits.bundles: upload`](/android-publisher/api-ref/rest/v3/edits.bundles/upload).\n3. Assign the bundle to a track by calling [`Edits.tracks: update`](/android-publisher/api-ref/rest/v3/edits.tracks/update). To avoid releasing the new version to end users at this stage, set the status of the new release to **draft**.\n4. Commit the edit.\n5. Download the APKs generated from the bundle that you uploaded in step 2 using the Generated APKs methods in the API.\n6. Process your downloaded APKs.\n7. Create a new edit as you did in step 1.\n8. Promote the draft release to a staged or full rollout by calling [`Edits.tracks: update`](/android-publisher/api-ref/rest/v3/edits.tracks/update).\n9. Commit the edit.\n\n| **Tip:** Alternatively, if you want to avoid committing a draft release, you can release a new version of the app to an internal test track before downloading the generated APKs.\n\nHow to construct your APK directory\n-----------------------------------\n\nIf you need to use your APK files with `bundletool`, follow these steps to build\nthem using the Generated APKs API:\n\n1. When calling the Generated APKs list method, the response will contain **TargetingInfo** field for each signing key. Write this field value to a file named `toc.json`.\n2. Download your APKs, and put them in a directory with the `toc.json` created in the previous step. Note that each downloaded APK must be named \"**DownloadId.apk** \", where *DownloadId* is the ID used to download the APK from the Generated APKs download method.\n3. You can now use this directory with `bundletool` version 1.15.2 or higher. For example, `bundletool install-apks --apks /path/to/created/directory`."]]