To develop with Android 13 APIs and test your app with the Android 13 behavior changes, you need to set up the Android 13 SDK. Follow the instructions on this page to set up the Android 13 SDK in Android Studio and build and run your app on Android 13.
Get Android Studio
The Android 13 SDK includes changes that are not compatible with some older versions of Android Studio. For the best development experience with the Android 13 SDK, use Android Studio Chipmunk | 2021.2.1 or higher.
Install the SDK
Within Android Studio, you can install the Android 13 SDK as follows:
- Click Tools > SDK Manager.
- In the SDK Platforms tab, select Android Tiramisu Preview.
- In the SDK Tools tab, select Android SDK Build-Tools 33.
- Click OK to install the SDK.
Update your app's build configuration
To access Android 13 APIs and test your app's compatibility with Android 13,
open your module-level build.gradle
or build.gradle.kts
file, and
update them with values for Android 13. How you format the values depends on
the version of the Android Gradle plugin (AGP) that you are using.
AGP 7.0.0 or higher
If you are using AGP 7.0.0 or higher, update your app's build.gradle
or
build.gradle.kts
file with the following values for Android 13:
Groovy
android { compileSdk 33 defaultConfig { targetSdk 33 } }
Kotlin
android { compileSdk = 33 defaultConfig { targetSdk = 33 } }
AGP 4.2.0 or lower
If you are using AGP 4.2.0 or lower, update your app's build.gradle
or
build.gradle.kts
file with the following values for Android 13:
Groovy
android { compileSdkVersion "33" defaultConfig { targetSdkVersion "33" } }
Kotlin
android { compileSdkVersion = "33" defaultConfig { targetSdkVersion = "33" } }
Next steps
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 13, read Android 13 features.