To develop apps for the Android N Preview, you need to make some updates to your developer environment, as described on this page.
To simply test your app's compatibility on the Android N system image, follow the guide to Test on an Android N Device.
Get Android Studio 2.1
The Android N platform adds support for Java 8 language features, which require a new compiler called Jack. The latest version of Jack is currently supported only in Android Studio 2.1. So if you want to use Java 8 language features, you need to use Android Studio 2.1 to build your app. Otherwise, you don't need to use the Jack compiler, but you still need to update to JDK 8 to compile against the Android N platform, as described below.
If you already have Android Studio installed, make sure you have Android Studio 2.1 or higher by clicking Help > Check for Update (on Mac, Android Studio > Check for Updates).
If you don't have it, download Android Studio 2.1 here.
Get the N Preview SDK
To start developing with Android N APIs, you need to install the Android N Preview SDK in Android Studio as follows:
- Open the SDK Manager by clicking Tools > Android > SDK Manager.
- In the SDK Platforms tab, select the Android N Preview check box.
- Click the SDK Tools tab, then select the Android SDK Build Tools, Android SDK Platform-Tools, and Android SDK Tools check boxes.
- Click OK, then accept the licensing agreements for any packages that need to be installed.
Get the N Preview reference documentation
Detailed information about the Android N APIs is available in the N Preview reference documentation, which you can download from the following table. This package contains an abridged, offline version of the Android developer web site, and includes an updated API reference for the Android N APIs and an API difference report.