To run and test your app on the new platform you need to set up an Android 7.1 Developer Preview runtime environment. You can do that in either of these ways:
- Install Android 7.1 Preview on a supported hardware device, or
- Set up an Android emulator running Android 7.1 Preview
If you want an environment for basic compatibility testing of your app on the new platform, all you need is your current APK and a hardware device or emulator. You don't necessarily need to update your full development environment to do basic testing.
If you want to modify your app to target Android 7.1 (API level 25) or use new Android 7.1 APIs, you need to set up a development environment that's updated to support Android 7.1. Set Up the Preview has details.
Set up a hardware device
The Android 7.1 Developer Preview offers system updates for a range of hardware devices that you can use for testing your app, from phones to tablets and TV.
If you have access to a supported device, you can update it to a Developer Preview milestone build in one of these ways:
- Enroll the device in automatic OTA system updates through the Android Beta Program. Once enrolled, your device will receive regular over-the-air (OTA) updates of all milestone builds in the N Developer Preview. When the next version of Android is released, your device will automatically update to the final version. This approach is recommended because it lets you seamlessly transition from your current environment, through the various releases of the N Developer Preview, to the release version.
- Download a Developer Preview system image and flash the device. OTA updates are not provided automatically for devices that you flash manually, but you can enroll those devices in Android Beta Program to get OTA updates. When the next version of Android is released, you can download the final device image from the factory images page.
Enroll the device in automatic OTA updates
If you have access to a supported device (see the list in the Downloads table), you can receive over-the-air updates to preview versions of Android by enrolling that device in the Android Beta Program. These updates are automatically downloaded and will update your device just like official system updates. When the next version of Android is released, the device will automatically update to the production version.
You can un-enroll a device at any time. The device will receive an OTA update to the most recent production version of Android available for that device (for example, Android 7.0 Nougat). The update requires a full device reset, so user data on the device will be removed. Make sure to back up important data before un-enrolling a device.
For more information and to enroll your device, see the Android Beta Program web site.
Note: Un-enrolling requires a full device reset. Back up important data first.
Flashing a device manually
At any time you can download the latest Developer Preview system image and manually flash it to your device. See the table below to download the system image for your test device. Manually flashing a device is useful if you need precise control over the test environment or need to reinstall frequently, such as for automated testing.
Installing a system image on a device removes all data from the device, so you should back up your data first.
After you back up your device data and download the system image below that matches your device, follow the instructions at developers.google.com/android to flash the image onto your device.
Manually flashed system images do not automatically receive OTA updates to later Developer Preview milestone builds or the final, production version. Make sure to keep your environment up-to-date and flash a new system image at each Developer Preview milestone.
If you decide you want to get OTA updates after manually flashing a device, all you need to do is enroll the device in the Android Beta Program. You can enroll the device at any time to receive the next Preview update over the air.
|Device||Download / Checksums|
Uninstalling the Preview from a device
If you want to uninstall the preview from a device, you can do so in one of these ways:
- Obtain a factory spec system image and then manually
flash it to the device.
- For Nexus devices and Pixel C devices, see the Factory Images for Nexus Devices page for downloads.
- For other devices, please contact the device manufacturer directly. Alternatively, if the device is supported in the Android Beta Program, you can enroll the device in the program and then un-enroll it (see below).
- Un-enroll the device from Android Beta Program. If the
device is enrolled in the Android Beta
Program, regardless of device, you can simply un-enroll it from the program.
The device will receive an OTA update to the most recent production version of Android available for that device (for example, Android 7.0 Nougat). The update requires a full device reset, so user data on the device will be removed. Make sure to back up important data before un-enrolling a device.
Note: Uninstalling a Developer Preview system image prior to the end of the program requires a full device reset and removes all user data on the device.
Set up an emulator
To use the Android Emulator to run the Android 7.1 Preview, you need to download the Android 7.1 Preview SDK and create a virtual device for the emulator.
First, download the Android 7.1 Preview SDK as follows (if you already got it while setting up to develop for Android 7.1 Preview, you can skip this part):
- In Android Studio, open the Settings dialog (File > Settings on Windows/Linux, or Android Studio > Preferences on Mac). In the left pane, select Appearance & Behavior > System Settings > Android SDK.
- Click the SDK Platforms tab, and then check the Android 7.1 Preview checkbox.
- Click the SDK Tools tab, and then check the Android SDK Build Tools, Android SDK Platform-Tools, and Android SDK Tools checkboxes.
- Click OK and accept the license agreements for any packages to be installed.
You should now have Android SDK Build-Tools 25.0 0 rc1, Platform-Tools 24.0.0 rc1, and SDK Tools 25.0.9. If you do not update the SDK Tools to 25.0.9, then you won't be able to run the x86_64 system images for Android 7.1 Preview.
Now create a virtual device with the Android 7.1 Preview system image:
- Open the AVD Manager by selecting Tools > Android > AVD Manager.
- Click Create Virtual Device.
- Select a device such as Nexus 5X, Nexus 6P, Nexus 9, or Android TV, then click Next.
- Select the N system image (with the x86 ABI), then click Next. (Only x86 system images are currently supported with the Android Emulator for the Android 7.1 Preview Preview.)
- Complete the rest of the AVD configuration and click Finish.
You can now launch the Android Emulator with the Android 7.1 Preview AVD.
For the best experience in the Android Emulator, make sure you're using Android Studio 2.1 or higher, which supports Android Emulator 2.0 with much faster performance compared to the emulator in Android Studio 1.5.
For more information about creating virtual devices, see Managing Virtual Devices.