- Install Android Studio 2.4 Canary.
Only Android Studio 2.4 includes support for all the new developer features
available with Android O. So you need to get the canary version of Android Studio
2.4 to begin using the Android O SDK. But you can still keep your stable
version of Android Studio installed.
- Launch Android Studio 2.4 and open the SDK Manager by clicking Tools > Android > SDK Manager.
- In the SDK Platforms tab, check Show Package Details. Below
Android O Preview check the following:
- Android SDK Platform O
- Google APIs Intel x86 Atom System Image (only required for the emulator)
- Switch to the SDK Tools tab and check all items that have updates available (click
each checkbox that shows a dash ). This should include the following that are required:
- Android SDK Build-Tools 26.0.0 (rc1 or higher)
- Android SDK Platform-Tools 26.0.0 (rc1 or higher)
- Android Emulator 26.0.0
- Support Repository
- Click OK to install all the selected SDK packages.
Update your build configuration
UpdatecompileSdkVersion
, buildToolsVersion
,
targetSdkVersion
, and the Support Library version with the following versions:
android { compileSdkVersion 'android-O' buildToolsVersion '26.0.0-rc1' defaultConfig { targetSdkVersion 'O' } ... } dependencies { compile 'com.android.support:appcompat-v7:26.0.0-alpha1' }
You cannot publish your app with this configuration. The "O" version
is a provisional API level that is usable only for development and testing during the Android O
Developer Preview. You must wait to publish your Android O changes until the final API level is
released, and then update your configuration again at that time.
More about Android O: https://developer.android.com/index.html