page.title=Run Your App on the N Preview meta.keywords="preview", "android" page.tags="preview", "developer preview" page.image=images/cards/card-n-sdk_2x.png @jd:body
  1. Set up a Virtual Device
  2. Set Up a Hardware Device

If you have an existing Android app and you simply want to run it on the N Preview system image, then you need either a virtual device or a supported hardware device configured with N Preview system image.

Simply installing your app onto the N Preview this way does not require any changes to your app source code. If, however, you want to update your app to use new APIs in the N Preview and new language features of Java 8, then you need to download Android Studio 2.1 (preview) as described in Set Up to Develop for the N Preview.

So, although Android Studio 2.1 is required for development with N Preview APIs, you can use Android Studio 1.5 or higher if you simply want to run your app in the emulator or a connected device.

Set up a Virtual Device

To use the Android Emulator to run the N Preview you need to download the Android N Preview SDK and create a virtual device for the emulator.

First, downloaded the Android N Preview SDK as follows (if you already got it while setting up Android Studio 2.1, you can skip this part):

  1. In Android Studio, open the Settings dialog (File > Settings on Windows/Linux, or Android Studio > Preferences on Mac). In the left panel, select Appearance & Behavior > System Settings > Android SDK.
  2. Click the SDK Platforms tab, then select the Android N Preview check box.
  3. Click the SDK Tools tab, then select the Android SDK Build Tools, Android SDK Platform-Tools, and Android SDK Tools check boxes.
  4. Click OK and accept the license agreements for any packages to be installed.

Now create a virtual device with the N Preview system image:

  1. Open the AVD Manager by selecting Tools > Android > AVD Manager.
  2. Click Create Virtual Device.
  3. Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV, then click Next.
  4. Select the N system image (with the x86 ABI), then click Next.
  5. Complete the rest of the AVD configuration and click Finish.

You can now launch the Android Emulator with the Android N Preview AVD.

For more information about creating virtual devices, see Managing Virtual Devices.

Set Up a Hardware Device

If you have a Nexus 5X, Nexus 6P, Nexus 9, Pixel C, or Nexus Player, you can install the N Preview for testing your app.

Important: Installing a preview image on a device removes all data from it, so you should backup any data before installing a preview image.

TODO(smain/joefernandez): Merge as appropriate with Image Downloads and OTA Updates.