Setting Up the Preview SDK
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.
The Android L developer preview provides you with 32-bit system images to flash the following devices:
To create an AVD with the AVD Manager:
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:
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)
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)
"hammerhead"hammerhead-lpv79-preview-ac1d8a8e.tgz MD5: 5a6ae77217978cb7b958a240c2e80b57
SHA-1:ac1d8a8e4f4a1dca5864dc733caa940bffc28616
Nexus 7 (Wifi)
"razor"razor-lpv79-preview-d0ddf8ce.tgz MD5: b293a5d3a4e07beabebcc0be85ad68a2
SHA-1: d0ddf8ce733ba2a34279cdff8827fd604762c2342d
- 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.
build.gradle
file for your module
and make sure that:compileSdkVersion
is set to'android-L'
minSdkVersion
is set to'L'
targetSdkVersion
is set to'L'
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>
No comments:
Post a Comment