Utilizzare una limitazione del pubblico di rilascio per limitare la distribuzione dell'app
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Puoi ridurre notevolmente le probabilità di distribuire accidentalmente una versione della tua app non ancora pronta utilizzando una limitazione del pubblico di rilascio nell'app bundle o nell'APK. Puoi usare questo metodo per impedire il rilascio di una build per
gli utenti di produzione tramite Play Console o persino la distribuzione tramite
Play Console.
Rilasciare l'utilizzo delle restrizioni dei segmenti di pubblico
Per utilizzare una limitazione del pubblico di uscita, devi aggiungere un elemento <meta-data> all'elemento <application> nel file AndroidManifest.xml. Questo elemento controlla la progressione della distribuzione della build.
L'attributo android:value del tag <meta-data> deve essere impostato su una stringa
vuota e l'attributo android:name deve avere uno dei seguenti valori:
L'app bundle o l'APK può essere caricato su Play Console e distribuito agli utenti tramite la condivisione interna delle app o qualsiasi canale di test, inclusi i test aperti. Non può essere inclusa in una release nel canale di produzione.
Lo scopo è impedire il rilascio accidentale
di versioni di test delle app agli utenti di produzione.
L'app bundle o l'APK può essere caricato su Play Console e distribuito agli utenti tramite la condivisione interna delle app o qualsiasi canale di test chiuso. Non può essere incluso in una release nei canali di produzione o di test aperto.
Lo scopo è evitare il rilascio accidentale di versioni di test delle app a un numero elevato di utenti.
L'app bundle o l'APK può essere caricato su Play Console e distribuito agli utenti tramite la condivisione interna delle app o il canale di test interno. Non può essere incluso in una release nei canali di produzione, di test aperto o di test chiuso.
Lo scopo è
evitare il rilascio accidentale di versioni di test delle app al di fuori del
tuo team immediato.
Non è possibile caricare o distribuire l'app bundle o l'APK tramite Play
Console.
Lo scopo è impedire il rilascio di versioni di app solo per lo sviluppo a qualsiasi utente. Ad esempio, una build con funzionalità di sicurezza chiave disattivate per semplificare il debug.
Ad esempio, per evitare il rilascio di una build per gli utenti di produzione, aggiorna il file AndroidManifest.xml come segue:
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# Use a release audience restriction to limit your app's distribution\n\nYou can greatly reduce the chances of accidentally distributing a version of\nyour app that isn't ready yet by using a release audience restriction in your\napp bundle or APK. You can use this to prevent a build from being released to\nproduction users through Play Console, or even from being distributed through\nPlay Console at all.\n\nRelease audience restrictions usage\n-----------------------------------\n\nTo use a release audience restriction, you must add a `\u003cmeta-data\u003e` element to\nthe `\u003capplication\u003e` element in your `AndroidManifest.xml` file. This element\ncontrols how far the distribution of the build can progress.\nThe `\u003cmeta-data\u003e` tag must have its `android:value` attribute set to the empty\nstring, and the `android:name` attribute must be one of the following values:\n\n| Name | Effect |\n|-----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` com.google.android.play.largest_release_audience.NONPRODUCTION ` | The app bundle or APK can be uploaded to Play Console and distributed to users through Internal App Sharing or any testing track, including open testing. It **cannot** be included in a release on the Production track. This is intended to prevent accidental release of test versions of apps to production users. |\n| ` com.google.android.play.largest_release_audience.CLOSED_TESTING ` | The app bundle or APK can be uploaded to Play Console and distributed to users through Internal App Sharing or any closed testing track. It **cannot** be included in a release on the Production or Open Testing tracks. This is intended to prevent accidental release of test versions of apps to a large number of users. |\n| ` com.google.android.play.largest_release_audience.INTERNAL_TESTING ` | The app bundle or APK can be uploaded to Play Console and distributed to users through Internal App Sharing or the Internal Test Track. It **cannot** be included in a release on the Production, Open Testing, or Closed Testing tracks. This is intended to prevent accidental release of test versions of apps outside your immediate team. |\n| ` com.google.android.play.largest_release_audience.STOPSHIP ` | The app bundle or APK cannot be uploaded to or distributed through Play Console. This is intended to prevent releasing development-only versions of apps to any users. For example, a build which has key security features disabled for easier debugging. |\n\n| **Note:** Because the restriction is built into your app bundle or APK, you can only change it by compiling a new build of your app with a new versionCode.\n\nFor example, to prevent a build being released to production users, update your\n`AndroidManifest.xml` file as follows: \n\n \u003cmanifest ... \u003e\n \u003capplication ... \u003e\n ...\n \u003cmeta-data\n android:name=\"com.google.android.play.largest_release_audience.NONPRODUCTION\"\n android:value=\"\" /\u003e\n \u003c/application\u003e\n \u003c/manifest\u003e\n\n| **Important:** The `\u003cmeta-data\u003e` element must be a direct child of the `\u003capplication\u003e` element in order for it to be detected by Google Play. It won't be detected if it is part of an `\u003cactivity\u003e` or `\u003cservice\u003e` element. If there are multiple restrictions in your application manifest, then the most restrictive will be applied.\n| **Tip:** If you have an Android library that adds some optional features for testing or internal debugging, you can add the restriction to the library's manifest. Any build which includes the library will then automatically include the release audience restriction."]]