OSDN Git Service

am dfa79aeb: am d5600855: Merge "docs: Refresh Wearable support library reference...
[android-x86/frameworks-base.git] / docs / html / preview / setup-sdk.jd
1 page.title=Set Up the Preview SDK
2 page.image=images/cards/card-set-up_16-9_2x.png
3 @jd:body
4
5
6
7
8
9
10
11 <div style="position:relative; min-height:600px">
12
13   <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
14
15     <p class="sdk-terms-intro">Before installing the Android SDK, you must agree to the following terms and conditions.</p>
16
17       <h2 class="norule">Terms and Conditions</h2>
18     <div class="sdk-terms" onfocus="this.blur()" style="width:678px">
19 This is the Android SDK Preview License Agreement (the “License Agreement”).
20
21 1. Introduction
22
23 1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
24
25 1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
26
27 1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
28
29 2. Accepting the License Agreement
30
31 2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
32
33 2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
34
35 2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
36
37 2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
38
39 3. Preview License from Google
40
41 3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
42
43 3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
44
45 3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
46
47 3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
48
49 3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
50
51 3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
52
53 3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
54
55 3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
56
57 4. Use of the Preview by You
58
59 4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
60
61 4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
62
63 4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
64
65 4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
66
67 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
68
69 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
70
71 4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
72
73 5. Your Developer Credentials
74
75 5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
76
77 6. Privacy and Information
78
79 6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
80
81 6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
82
83 7. Third Party Applications
84
85 7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
86
87 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
88
89 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
90
91 8. Using Google APIs
92
93 8.1 Google APIs
94
95 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
96
97 8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
98
99 9. Terminating the License Agreement
100
101 9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
102
103 9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
104
105 9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
106
107 9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
108 (A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
109 (B) Google issues a final release version of the Android SDK.
110
111 9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
112
113 10. DISCLAIMERS
114
115 10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
116
117 10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
118
119 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
120
121 11. LIMITATION OF LIABILITY
122
123 11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
124
125 12. Indemnification
126
127 12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
128
129 13. Changes to the License Agreement
130
131 13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
132
133 14. General Legal Terms
134
135 14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
136
137 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
138
139 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
140
141 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
142
143 14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
144
145 14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
146
147 14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
148     </div><!-- sdk terms -->
149
150
151
152     <div id="sdk-terms-form">
153       <p>
154         <input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
155         <label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
156       </p>
157       <p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
158     </div>
159
160
161   </div><!-- end TOS -->
162
163
164
165
166
167
168
169
170
171   <div id="landing">
172
173 <p>The Preview SDK is available from the Android SDK Manager.
174 This document assumes that you are familiar with Android app development, such
175 as using the Android SDK Manager and creating projects. If you're new to
176 Android, see <a href="{@docRoot}training/basics/firstapp/index.html">Building Your First
177 App</a> training lesson first.</a></p>
178
179 <h2 id="downloadSdk">Download the SDK</h2>
180
181 <ol>
182   <li>Start the <a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.</li>
183   <li>In the <b>Tools</b> section, select the latest Android <b>SDK Tools</b>,
184     <b>Platform-tools</b>, and <b>Build-tools</b>.</li>
185   <li>Select everything under the <b>Android M Developer Preview</b> section and
186     click <b>Install packages...</b></li>
187   <li>Accept the Licensing Agreement for all of the packages and click
188     <b>Install</b>.</li>
189 </ol>
190
191 <p class="note"><strong>Note:</strong> The Eclipse ADT plug-in requires Java 7
192   if your compilation target is the M Developer Preview.</p>
193
194 <h2 id="setupHardware">Set Up Hardware and AVDs</h2>
195
196 <p>The Android M Developer Preview provides you with system images
197 to flash the following devices:
198 </p>
199
200 <ul>
201   <li>Nexus 5</li>
202   <li>Nexus 6</li>
203   <li>Nexus 9</li>
204   <li>Nexus Player</li>
205 </ul>
206
207 <p>In addition, the Preview SDK provides emulator system images, which include
208 experimental 64-bit system images along with standard 32-bit system images.
209 </p>
210
211 <p class="note"><strong>Note:</strong> The 64-bit system images require the
212 Intel x86 Emulator Accelerator (HAXM) Rev.5 which can be downloaded from the
213 <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> <em>Extras</em>
214 folder.</p>
215
216
217 <h3 id="installImage">Install the M Preview System Image</h3>
218
219 <p class="warning"><b>Warning:</b> The following Android system images are
220 previews and are subject to change. Your use of these system images is
221 governed by the Android SDK Preview License Agreement. The Android preview
222 system images are not stable releases, and may contain errors and defects that
223 can result in damage to your computer systems, devices, and data. The preview
224 Android system images are not subject to the same testing as the factory OS and
225 can cause your phone and installed services and applications to stop working.
226 </p>
227
228
229 <ol>
230   <li>Download and uncompress the Android Developer Preview package.
231     <table>
232       <tr>
233         <th scope="col">Device</th>
234         <th scope="col">Download / Checksums</th>
235       </tr>
236       <tr id="hammerhead">
237         <td>Nexus 5 (GSM/LTE) <br>"hammerhead"</td>
238         <td><a href="#top" onclick="onDownload(this)"
239           >hammerhead-mpv79-preview-ac1d8a8e.tgz</a><br>
240           MD5: 5a6ae77217978cb7b958a240c2e80b57<br>
241           SHA-1: ac1d8a8e4f4a1dca5864dc733caa940bffc28616
242         </td>
243       </tr>
244       <tr id="shamu">
245         <td>Nexus 6 <br>"shamu"</td>
246         <td><a href="#top" onclick="onDownload(this)"
247           >shamu-mpv79-preview-ac1d8a8e.tgz</a><br>
248           MD5: 5a6ae77217978cb7b958a240c2e80b57<br>
249           SHA-1: ac1d8a8e4f4a1dca5864dc733caa940bffc28616
250         </td>
251       </tr>
252       <tr id="volantis">
253         <td>Nexus 9 <br>"volantis"</td>
254         <td><a href="#top" onclick="onDownload(this)"
255           >volantis-mpv79-preview-ac1d8a8e.tgz</a><br>
256           MD5: 5a6ae77217978cb7b958a240c2e80b57<br>
257           SHA-1: ac1d8a8e4f4a1dca5864dc733caa940bffc28616
258         </td>
259       </tr>
260       <tr id="fugu">
261         <td>Nexus Player <br>"fugu"</td>
262         <td><a href="#top" onclick="onDownload(this)"
263           >fugu-mpv79-preview-d0ddf8ce.tgz</a><br>
264           MD5: b293a5d3a4e07beabebcc0be85ad68a2<br>
265           SHA-1: d0ddf8ce733ba2a34279cdff8827fd604762c2342d
266         </td>
267       </tr>
268     </table>
269   </li>
270
271   <li>Follow the instructions at
272   <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
273   to flash the image onto your device.</li>
274 </ol>
275
276
277 <h3 id="revertDevice">Revert a Device to Factory Specifications</h3>
278
279   <p>If you want to uninstall the Preview and revert the device to factory
280 specifications, go to <a href="http://developers.google.com/android
281 /nexus/images">developers.google.com/android</a> and download the image you want
282 to flash to for your device. Follow the instructions on that page to flash the
283 image to your device.</p>
284
285
286 <h3 id="setupAVD">Set up an AVD</h3>
287
288 <p>You can set up <a href="{@docRoot}tools/devices/">Android Virtual Devices
289 (AVD)</a> and use the emulator to build and test apps with the M Preview.</p>
290
291 <p>To create an AVD with the AVD Manager:</p>
292
293 <ol>
294   <li>Install the M Preview SDK in your development environment, as described
295       in <a href="{@docRoot}preview/setup-sdk.html">Setting Up the Preview
296       SDK.</a></li>
297   <li>Follow the steps in
298       <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD
299       Manager</a>. Use the following settings:
300     <ul>
301       <li><b>Device:</b> Nexus 5, Nexus 6, Nexus 9, or Nexus Player</li>
302       <li><b>Target:</b>
303        Android M (Preview) - API Level M</li>
304     </ul>
305   </li>
306 </ol>
307
308
309 <h2 id="createProject">Create a Project</h2>
310
311 <p>Android Studio makes it easy to create a project for the M Developer Preview. Follow
312 the steps described in <a href="{@docRoot}sdk/installing/create-project.html">Creating a
313 Project</a>. In the <strong>Form Factors</strong> screen:</p>
314
315 <ul>
316   <li>Check <strong>Phone and Tablet</strong>.</li>
317   <li>Select <strong>API 22+: Android M (Preview)</strong> in <strong>Minimum SDK</strong>.</li>
318 </ul>
319
320 <p>On the development environment, open the <code>build.gradle</code> file for your module
321 and make sure that:</p>
322
323 <ul>
324   <li><code>compileSdkVersion</code> is set to <code>'android-M'</code></li>
325   <li><code>minSdkVersion</code> is set to <code>'M'</code></li>
326   <li><code>targetSdkVersion</code> is set to <code>'M'</code></li>
327 </ul>
328
329   </div><!-- landing -->
330
331 </div><!-- relative wrapper -->
332
333
334
335 <script>
336   var urlRoot = "http://storage.googleapis.com/androiddevelopers/preview/";
337   function onDownload(link) {
338
339     $("#downloadForRealz").html("Download " + $(link).text());
340     $("#downloadForRealz").attr('href', urlRoot + $(link).text());
341
342     $("#tos").fadeIn('fast');
343     $("#landing").fadeOut('fast');
344
345     return true;
346   }
347
348
349   function onAgreeChecked() {
350     /* verify that the TOS is agreed */
351     if ($("input#agree").is(":checked")) {
352       /* reveal the download button */
353       $("a#downloadForRealz").removeClass('disabled');
354     } else {
355       $("a#downloadForRealz").addClass('disabled');
356     }
357   }
358
359   function onDownloadForRealz(link) {
360     if ($("input#agree").is(':checked')) {
361       $("#tos").fadeOut('fast');
362       $("#landing").fadeIn('fast');
363       ga('send', 'event', 'M Preview', 'System Image', $("#downloadForRealz").html());
364       location.hash = "";
365       return true;
366     } else {
367       $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
368         function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
369       );
370       return false;
371     }
372   }
373
374   $(window).hashchange( function(){
375     if (location.hash == "") {
376       location.reload();
377     }
378   });
379
380 </script>