The Android 16 Beta is now available.
Try it out today and let us know what you think!
Configurare l'SDK 12L
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Per sviluppare con le API da 12 litri e testare l'app, devi configurare l'SDK da 12 litri.
Segui le istruzioni in questa pagina per configurare l'SDK Android 12 in Android
Studio e creare ed eseguire l'app su 12L.
Scarica Android Studio
L'SDK 12L include modifiche non compatibili con alcune versioni precedenti di Android Studio. Per un'esperienza di sviluppo ottimale con l'SDK 12L, utilizza Android Studio Chipmunk | 2021.2.1 o versioni successive.
Scarica Android Studio
Installa l'SDK
In Android Studio, puoi installare l'SDK 12L nel seguente modo:
- Fai clic su Strumenti > SDK Manager, quindi su Mostra dettagli pacchetto.
- Nella scheda Piattaforme SDK, espandi la sezione Android 12L ("Sv2") e seleziona il pacchetto Android SDK Platform 32.
- Nella scheda Strumenti SDK, espandi la sezione Android SDK Build-Tools 34
e seleziona la versione
32.x.x
più recente.
- Fai clic su Applica > OK per scaricare e installare i pacchetti selezionati.
Aggiorna la configurazione di build dell'app
Per accedere alle API 12L e testare la compatibilità della tua app con 12L, apri il file build.gradle
o build.gradle.kts
a livello di modulo e aggiorna compileSdkVersion
e targetSdkVersion
con i valori per 12L:
Groovy
android {
compileSdkVersion "32"
defaultConfig {
targetSdkVersion "32"
}
}
Kotlin
android {
compileSdkVersion("32")
defaultConfig {
targetSdkVersion("32")
}
}
Per scoprire di più sulle funzionalità e sulle modifiche di 12L, consulta Funzionalità e modifiche di 12L.
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.
[null,null,["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# Set up the 12L SDK\n\nTo develop with the 12L APIs and test your app, you need to set up the 12L SDK.\nFollow the instructions on this page to set up the Android 12 SDK in Android\nStudio and build and run your app on 12L.\n\nGet Android Studio\n------------------\n\nThe 12L SDK includes changes that are not compatible with some lower versions of\nAndroid Studio. For the best development experience with the 12L SDK, use\nAndroid Studio Chipmunk \\| 2021.2.1 or higher.\n\n[Get Android Studio](/studio)\n\nInstall the SDK\n---------------\n\nWithin Android Studio, you can install the 12L SDK as follows:\n\n1. Click **Tools \\\u003e SDK Manager** , then click **Show Package Details**.\n2. In the **SDK Platforms** tab, expand the **Android 12L (\"Sv2\")** section and select the **Android SDK Platform 32** package.\n3. In the **SDK Tools** tab, expand the **Android SDK Build-Tools 34** section and select the latest `32.x.x` version.\n4. Click **Apply \\\u003e OK** to download and install the selected packages.\n\nUpdate your app's build configuration\n-------------------------------------\n\nTo access 12L APIs and test your app's compatibility with 12L, open your\nmodule-level `build.gradle` or `build.gradle.kts` file, and update the\n`compileSdkVersion` and `targetSdkVersion` with values for 12L: \n\n### Groovy\n\n```groovy\nandroid {\n compileSdkVersion \"32\"\n\n defaultConfig {\n targetSdkVersion \"32\"\n }\n}\n```\n\n### Kotlin\n\n```kotlin\nandroid {\n compileSdkVersion(\"32\")\n\n defaultConfig {\n targetSdkVersion(\"32\")\n }\n}\n```\n\nTo learn more about the features and changes in 12L, see [12L features and\nchanges](/about/versions/12/12L/summary)."]]