Set up the Android 11 SDK

Android 11 contains a variety of great ways you can extend your app. Android 11 also includes behavior changes to improve battery life and security, and to enhance user privacy. Some of these behavior changes only affect apps that target Android 11, while others affect all apps when they are running on an Android 11 device, regardless of an app's targetSDKVersion.

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

Get the latest Android Studio Preview

The Android 11 SDK includes changes that are not compatible with some older versions of Android Studio. So, for the best development experience with the Android 11 SDK, we recommend that you install the latest preview version of Android Studio.

Get Android Studio Preview

You can compile and test Android 11 apps using Android Studio 3.3 and higher, but some users of the Android 11 SDK may encounter Gradle sync failures and warnings about outdated dependencies. Remember, you can keep your existing version of Android Studio installed, because you can install multiple versions side by side.

Get the Android 11 SDK

After you install and open Android Studio, install the Android 11 SDK as follows:

  1. Click Tools > SDK Manager.
  2. In the SDK Platforms tab, select Android 11.
  3. In the SDK Tools tab, select Android SDK Build-Tools 30 (or higher).
  4. Click OK to begin install.

Update your build configuration

Changing your app's build configuration to target Android 11 gives your app access to the Android 11 APIs and lets you fully test your app's compatibility as you prepare to add full support for Android 11. To do this, open your module-level build.gradle file and update the compileSdkVersion and targetSdkVersion:

android {
    compileSdkVersion 30

    defaultConfig {
        targetSdkVersion 30

To learn about the changes in Android 11 that might affect your app so you can begin testing for them, read the following pages:

To learn more about new APIs available in Android 11, read Android 11 features and APIs.