Within Android Studio, you can install the Android 12 SDK as follows:
- Click Tools > SDK Manager.
- In the SDK Platforms tab, select Android 12.
- In the SDK Tools tab, select Android SDK Build-Tools 31.
- Click OK to install the SDK.
Update your app's build configuration
To access Android 12 APIs and test your app's compatibility with Android 12,
open your module-level build.gradle
or build.gradle.kts
file, and
update the compileSdkVersion
and targetSdkVersion
with values for
Android 12:
Kotlin
android { compileSdkVersion("android-S") defaultConfig { targetSdkVersion("S") } }
Groovy
android { compileSdkVersion "android-S" defaultConfig { targetSdkVersion "S" } }
To learn about which changes might affect you, and to learn how to test these changes in your app, read the following topics:
To learn more about new APIs and features available in Android 12, read Android 12 features.