Set up the Android 15 SDK

To develop with Android 15 APIs and test your app with the Android 15 behavior changes, you need to set up the Android 15 SDK. Follow the instructions on this page to set up the Android 15 SDK in Android Studio and build and run your app on Android 15.

Get Android Studio

The Android 15 SDK includes changes that are not compatible with some lower versions of Android Studio. For the best development experience with the Android 15 SDK, use the latest preview version of Android Studio. Remember that you can keep your existing version of Android Studio installed, as you can install multiple versions side-by-side.

Get Android Studio

Install the SDK

Within Android Studio, you can install the Android 15 SDK as follows:

  1. Click Tools > SDK Manager.
  2. In the SDK Platforms tab, expand the Android VanillaIceCream Preview section and select the Android SDK Platform VanillaIceCream package.
  3. In the SDK Tools tab, expand the Android SDK Build-Tools 35 section and select the latest 35.x.x version. These labels might have a suffix such as rc1 or rc2.
  4. Click OK to install the SDK.

Update your app's build configuration

To access Android 15 APIs and test your app's compatibility with Android 15, open your module-level build.gradle or build.gradle.kts file, and update them with values for Android 15. 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 15:

Groovy

android {
    compileSdkPreview "VanillaIceCream"
    ...
    defaultConfig {
        targetSdkPreview "VanillaIceCream"
    }
}

Kotlin

android {
    compileSdkPreview = "VanillaIceCream"
    ...
    defaultConfig {
        targetSdkPreview = "VanillaIceCream"
    }
}

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 15:

Groovy

android {
    compileSdkVersion "android-VanillaIceCream"
    ...
    defaultConfig {
        targetSdkVersion "android-VanillaIceCream"
    }
}

Kotlin

android {
    compileSdkVersion = "android-VanillaIceCream"
    ...
    defaultConfig {
        targetSdkVersion = "android-VanillaIceCream"
    }
}