Set up the Android Q SDK

Android Q is the next major release of the Android, with a variety of great new ways you can extend your app. Android Q also includes behavior changes pages (for apps targeting Q and for all apps) to help improve battery life and security, as well as privacy changes, and these will affect your app on devices running the new version of Android.

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

Get the latest Android Studio Preview

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

Get Android Studio 3.5 Preview

You can compile and test Android Q apps using Android Studio 3.3 and higher, but some users of the Android Q Preview 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 Q Preview SDK

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

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

Update your build configuration

To fully test your app's compatibility with Android Q and begin using new APIs, open your module-level build.gradle file and update the compileSdkVersion and targetSdkVersion as shown here:

android {
    compileSdkVersion 29

    defaultConfig {
        targetSdkVersion 29
    }
    ...
}

To learn about the changes in Android Q that might affect your app and begin testing them, read Android Q behavior changes affecting all apps, Android Q behavior changes affecting apps targeting Android Q, and Android Q privacy changes.

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