blob: 66262dc44d672ab16fd4f50efbd897306a3435ea [file] [log] [blame]
Robert Ly20555292014-06-13 23:28:19 -07001page.title=Setting Up the Preview SDK
Robert Ly20555292014-06-13 23:28:19 -07002@jd:body
3
Robert Lyb8cabe92014-06-15 13:04:43 -07004<p>The Preview SDK is available from the Android SDK Manager. <!-- Not yet! -->
5This document assumes that you are familiar with Android app development, such
6as using the Android SDK Manager and creating projects. If you're new to
7Android, see <a href="/training/basics/firstapp/index.html">Building Your First
8App</a> training lesson first.</a></p>
Robert Ly20555292014-06-13 23:28:19 -07009
10<h2>Download the SDK</h2>
11
12<ol>
13 <li>Start the Android SDK Manager.</li>
Robert Lyb8cabe92014-06-15 13:04:43 -070014 <li>In the <b>Tools</b> section, select the latest Android <b>SDK Tools</b>,
15 <b>Platform-tools</b>, and <b>Build-tools</b>.</li>
16 <!-- Android L not yet showing up in Android SDK Manager... -->
17 <li>Select everything under the <b>Android L Developer Preview</b> section and
18 click <b>Install packages...</b></li>
19 <li>Accept the Licensing Agreement for all of the packages and click
20 <b>Install</b>.</li>
Robert Ly20555292014-06-13 23:28:19 -070021</ol>
22
Robert Ly40895832014-06-22 22:07:51 -070023<h2>Set Up Hardware and AVDs</h2>
24
25<p>The Android L developer preview provides you with 32-bit system images
26to flash the following devices:
27</p>
28
29<ul>
30 <li>Nexus 5</li>
31 <li>Nexus 7 Wi-Fi (version 2, released in 2013)</li>
32</ul>
33
34<p>In addition, you also get the emulator system images, which includes
35experimental 64-bit system images along with standard 32-bit system images.
36</p>
37
38<h3>Instal the L Preview System Image</h3>
39
40<!-- Will we get an official warning text from the lawyercats? Is this it? -->
41<p class="warning"><b>Warning</b>: This is a preview version of the Android
42system image, and is subject to change. Your use of this system image is
43governed by the Android SDK Preview License Agreement. The Android preview
44system image is not a stable release, and may contain errors and defects that
45can result in damage to your computer systems, devices, and data. The preview
46Android system image is not subject to the same testing as the factory OS and
47can cause your phone and installed services and applications to stop working.
48</p>
49
50
51<ol>
52 <li>Download and extract the Android Developer Preview package to a directory
53 (which we'll call <code>&lt;l_download_dir&gt;</code> in these
54 instructions).</li>
55 <li>Connect your powered-off Android device to your development machine. Put
56 the device in fastboot mode by pressing and holding the following buttons:
57 <ul>
58 <li><strong>Nexus 5:</strong> <i>volume down</i> + <i>volume up</i> +
59 <i>power</i></li>
60 <li><strong>Nexus 7:</strong> <i>volume down</i> + <i>power</i> </li>
61 </ul>
62 <p class="note">Alternatively, you can enter fastboot mode by booting up
63 the device and running <code>adb reboot bootloader</code> with USB debugging
64 turned on.</p>
65 </li>
66 <li>Follow the instructions at
67 <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
68 to set up your system for flashing devices.</li>
69 <li>Run the <code>&lt;l_download_dir&gt;/flash-all</code> script
70 corresponding to your platform. This script flashes all of the system data
71 onto the phone.</li> <!-- Confirm names of flash scripts -->
72 <li>(Optional) After flashing is complete, lock your device's bootloader by
73 putting it in fastboot mode and running <code>fastboot oem lock</code>.
74 (This does not wipe your device.) Once you do this, you will not be able to
75 flash your device until you run run <code>fastboot oem unlock</code>,
76 which unlocks the bootloader and wipes your device. We recommend you leave the
77 bootloader unlocked until you are done with flashing the device.</li>
78</ol>
79
80<h3>Revert a Device to Factory Specifications</h3>
81
82 <p>If you want to uninstall the L Preview and revert the device to factory
83specifications, go to <a href="http://developers.google.com/android
84/nexus/images">developers.google.com/android</a> and download the image you want
85to flash to for your device. Follow the instructions on that page to flash the
86image to your device.</p>
87
88
89<h3>Set up an AVD</h3>
90
91<p>You can set up <a href="{@docRoot}tools/devices/">Android Virtual Devices
92(AVD)</a> and use the emulator to build and test apps with the L Preview.</p>
93
94<p>To create an AVD with the AVD Manager:</p>
95
96<ol>
97 <li>Install the L Preview SDK in your development environment, as described
98 in <a href="{@docRoot}preview/setup-sdk.html">Setting Up the Preview
99 SDK.</a></li>
100 <li>Follow the steps in
101 <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD
102 Manager</a>. Use the following settings:
103 <ul>
104 <li><b>Device:</b> Either Nexus 5 or Nexus 7</li>
105 <li><b>Target:</b> <!-- Confirm exact text when we have final distro -->
106 Android L (Preview) - API Level L</li>
107 </ul>
108 <!-- Confirm this works when you can download image through SDK manager! -->
109 </li>
110</ol>
111
112<h2>Create a Project</h2>
Robert Ly20555292014-06-13 23:28:19 -0700113
114<ol>
115 <li>Create a new Android project with the following properties:
Robert Lyb8cabe92014-06-15 13:04:43 -0700116 <ul>
Robert Ly20555292014-06-13 23:28:19 -0700117 <li>Minimum SDK Version: L</li>
118 <li>Target SDK Version: L</li>
119 <li>Build Target: L</li>
Robert Lyb8cabe92014-06-15 13:04:43 -0700120 </ul>
Robert Ly20555292014-06-13 23:28:19 -0700121 </li>
Robert Lyb8cabe92014-06-15 13:04:43 -0700122 <li>Choose the theme <code>Theme.Material</code>
123 <!-- put in name as it appears in Eclipse menu? -->
Robert Ly20555292014-06-13 23:28:19 -0700124
Robert Lyb8cabe92014-06-15 13:04:43 -0700125</ol>