The Preview SDK is available from the Android SDK Manager. This document assumes that you are familiar with Android app development, such as using the Android SDK Manager and creating projects. If you're new to Android, see Building Your First App training lesson first.
Download the SDK
- Start the Android SDK Manager.
- In the Tools section, select the latest Android SDK Tools, Platform-tools, and Build-tools.
- Select everything under the Android L Developer Preview section and click Install packages...
- Accept the Licensing Agreement for all of the packages and click Install.
Note: The Eclipse ADT plug-in requires Java 7 if your compilation target is the L developer preview.
Set Up Hardware and AVDs
The Android L developer preview provides you with 32-bit system images to flash the following devices:
- Nexus 5
- Nexus 7 Wi-Fi (version 2, released in 2013)
In addition, you also get the emulator system images, which includes experimental 64-bit system images along with standard 32-bit system images.
Install the L Preview System Image
Warning: This is a preview version of the Android system image, and is subject to change. Your use of this system image is governed by the Android SDK Preview License Agreement. The Android preview system image is not a stable release, and may contain errors and defects that can result in damage to your computer systems, devices, and data. The preview Android system image is not subject to the same testing as the factory OS and can cause your phone and installed services and applications to stop working.
- Download and uncompress the Android Developer Preview package.
Device Download Checksum Nexus 5 (GSM/LTE)
Nexus 7 (Wifi)
- Follow the instructions at developers.google.com/android to flash the image onto your device.
Revert a Device to Factory Specifications
If you want to uninstall the L Preview and revert the device to factory specifications, go to developers.google.com/android and download the image you want to flash to for your device. Follow the instructions on that page to flash the image to your device.
Set up an AVD
You can set up Android Virtual Devices (AVD) and use the emulator to build and test apps with the L Preview.
To create an AVD with the AVD Manager:
- Install the L Preview SDK in your development environment, as described in Setting Up the Preview SDK.
- Follow the steps in
Managing AVDs with AVD
Manager. Use the following settings:
- Device: Either Nexus 5 or Nexus 7
- Target: Android L (Preview) - API Level L
Create a Project
Android Studio makes it easy to create a project for the L Developer Preview. Follow the steps described in Creating a Project. In the Form Factors screen:
- Check Phone and Tablet.
- Select API 20+: Android L (Preview) in Minimum SDK.
On the development environment, open the
build.gradle file for your module
and make sure that:
compileSdkVersionis set to
minSdkVersionis set to
targetSdkVersionis set to
To use the material theme, open the
values/styles.xml in your project and make
sure that you theme extends the material theme:
<resources> <style name="AppTheme" parent="android:Theme.Material"> <!-- Customize your theme here --> </style> </resources>