blob: 9de247aceb10819f336ab654af45a8d5de44d671 [file] [log] [blame]
Dirk Dougherty7b229ef2010-03-26 17:32:26 -07001page.title=Installing the SDK
Dirk Doughertyee58d1b2009-10-16 15:25:15 -07002sdk.preview=0
3
4@jd:body
5
Scott Main38dea272010-11-01 13:03:25 -07006
7<script type="text/javascript">
8function toggleDiv(link) {
9 var toggleable = $(link).parent();
10 if (toggleable.hasClass("closed")) {
11 //$(".toggleme", toggleable).slideDown("fast");
12 toggleable.removeClass("closed");
13 toggleable.addClass("open");
14 $(".toggle-img", toggleable).attr("title", "hide").attr("src", (toRoot +
15"assets/images/triangle-opened.png"));
16 } else {
17 //$(".toggleme", toggleable).slideUp("fast");
18 toggleable.removeClass("open");
19 toggleable.addClass("closed");
20 $(".toggle-img", toggleable).attr("title", "show").attr("src", (toRoot +
21"assets/images/triangle-closed.png"));
22 }
23 return false;
24}
25</script>
26<style>
27.toggleable {
28 padding: .25em 1em 0em 1em;
29 margin-bottom: 0;
30}
31.toggleme {
32 padding: 1em 1em 0 2em;
33 line-height:1em;
34}
35.toggleable a {
36 text-decoration:none;
37}
38.toggleme a {
39 text-decoration:underline;
40}
41.toggleable.closed .toggleme {
42 display:none;
43}
44#jd-content .toggle-img {
45 margin:0;
46}
47</style>
48
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070049<div id="qv-wrapper">
50<div id="qv">
51
52 <h2>In this document</h2>
53 <ol>
Scott Main081127b2010-10-29 15:56:27 -070054 <li><a href="#Preparing">1. Preparing Your Development Computer</a></li>
55 <li><a href="#Installing">2. Downloading the SDK Starter Package</a></li>
56 <li><a href="#InstallingADT">3. Installing the ADT Plugin for Eclipse</a></li>
Scott Main369c1c12010-12-07 11:17:00 -080057 <li><a href="#AddingComponents">4. Adding Platforms and Other Components</a>
Scott Main38dea272010-11-01 13:03:25 -070058 <ol>
Scott Main4fb51ca2010-11-09 14:47:15 -080059 <li><a href="#components">Available Components</a></li>
Scott Main38dea272010-11-01 13:03:25 -070060 <li><a href="#which">Recommended Components</a></li>
61 </ol></li>
Scott Main0a21f342010-11-08 12:06:26 -080062 <li><a href="#sdkContents">5. Exploring the SDK (Optional)</a></li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070063 <li><a href="#NextSteps">Next Steps</a></li>
64 <li><a href="#troubleshooting">Troubleshooting</a></li>
65 </ol>
66
67<h2>See also</h2>
68 <ol>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -070069 <li><a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a></li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070070 <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
71 </ol>
72
73</div>
74</div>
75
Scott Main06cf15e2010-10-28 00:02:31 -070076<p>This page describes how to install the Android SDK
Dirk Doughertya374f512009-11-09 11:41:09 -080077and set up your development environment for the first time.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070078
Scott Main06cf15e2010-10-28 00:02:31 -070079<p>If you encounter any problems during installation, see the
Dirk Doughertya250f0c2009-10-22 18:02:45 -070080<a href="#troubleshooting">Troubleshooting</a> section at the bottom of
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070081this page.</p>
82
83<h4>Updating?</h4>
84
Scott Main081127b2010-10-29 15:56:27 -070085<p>If you already have an Android SDK, use the <em>Android SDK and AVD Manager</em> tool to install
86updated tools and new Android platforms into your existing environment. For information about how to
87do that, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070088
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070089
Dirk Dougherty7b229ef2010-03-26 17:32:26 -070090<h2 id="Preparing">Step 1. Preparing Your Development Computer</h2>
91
92<p>Before getting started with the Android SDK, take a moment to confirm that
93your development computer meets the <a href="requirements.html">System
Scott Main081127b2010-10-29 15:56:27 -070094Requirements</a>. In particular, you might need to install the <a
95href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>, if you don't have it already. </p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070096
97<p>If you will be developing in Eclipse with the Android Development
Scott Main081127b2010-10-29 15:56:27 -070098Tools (ADT) Plugin&mdash;the recommended path if you are new to
99Android&mdash;make sure that you have a suitable version of Eclipse
Scott Main06cf15e2010-10-28 00:02:31 -0700100installed on your computer (3.4 or newer is recommended). If you need
101to install Eclipse, you can download it from this location: </p>
102
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700103<p style="margin-left:2em;"><a href=
Scott Main06cf15e2010-10-28 00:02:31 -0700104"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p>
105
Scott Main081127b2010-10-29 15:56:27 -0700106<p>For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended. Otherwise, a Java or
107RCP version of Eclipse is recommended.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700108
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700109
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700110<h2 id="Installing">Step 2. Downloading the SDK Starter Package</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700111
Scott Main38dea272010-11-01 13:03:25 -0700112<p>The SDK starter package is not a full
Scott Main081127b2010-10-29 15:56:27 -0700113development environment&mdash;it includes only the core SDK Tools, which you can
Scott Main38dea272010-11-01 13:03:25 -0700114use to download the rest of the SDK components (such as the latest Android platform).</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700115
Scott Main0a21f342010-11-08 12:06:26 -0800116<p>If you haven't already, get the latest version of the SDK starter package from the <a
Scott Main081127b2010-10-29 15:56:27 -0700117href="{@docRoot}sdk/index.html">SDK download page</a>.</p>
118
119<p>If you downloaded a {@code .zip} or {@code .tgz} package (instead of the SDK installer), unpack
120it to a safe location on your machine. By default, the SDK files are unpacked
121into a directory named <code>android-sdk-&lt;machine-platform&gt;</code>.</p>
Scott Main06cf15e2010-10-28 00:02:31 -0700122
Scott Main4fb51ca2010-11-09 14:47:15 -0800123<p>If you downloaded the Windows installer ({@code .exe} file), run it now and it will check
124whether the proper Java SE Development Kit (JDK) is installed (installing it, if necessary), then
125install the SDK Tools into a default location (which you can modify).</p>
126
127<p>Make a note of the name and location of the SDK directory on your system&mdash;you will need to
Scott Main06cf15e2010-10-28 00:02:31 -0700128refer to the SDK directory later, when setting up the ADT plugin and when using
129the SDK tools from command line.</p>
130
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700131
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700132<h2 id="InstallingADT">Step 3. Installing the ADT Plugin for Eclipse</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700133
134<p>Android offers a custom plugin for the Eclipse IDE, called Android
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700135Development Tools (ADT), that is designed to give you a powerful, integrated
136environment in which to build Android applications. It extends the capabilites
137of Eclipse to let you quickly set up new Android projects, create an application
Scott Main081127b2010-10-29 15:56:27 -0700138UI, debug your applications
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700139using the Android SDK tools, and even export signed (or unsigned) APKs in order
140to distribute your application. In general, developing in Eclipse with ADT is a
141highly recommended approach and is the fastest way to get started with Android.
142</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700143
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700144<p>If you'd like to use ADT for developing Android applications, install it now.
Scott Main081127b2010-10-29 15:56:27 -0700145Read <a href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a> for
146step-by-step installation instructions, then return here to continue the
147last step in setting up your Android SDK.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700148
Scott Main38dea272010-11-01 13:03:25 -0700149<p>If you prefer to work in a different IDE, you do not need to
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700150install Eclipse or ADT, instead, you can directly use the SDK tools to build and
Scott Main38dea272010-11-01 13:03:25 -0700151debug your application. The developer guide has more information about <a
152href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</p>
153
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700154
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700155
Scott Main369c1c12010-12-07 11:17:00 -0800156<h2 id="AddingComponents">Step 4. Adding Platforms and Other Components</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700157
Scott Main081127b2010-10-29 15:56:27 -0700158<p>The last step in setting up your SDK is using the <em>Android SDK and AVD Manager</em> (a
159tool included in the SDK starter package) to download
160essential SDK components into your development environment.</p>
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700161
Scott Main081127b2010-10-29 15:56:27 -0700162<p>The SDK uses a modular structure that separates the major parts of the SDK&mdash;Android platform
163versions, add-ons, tools, samples, and documentation&mdash;into a set of separately installable
164components. The SDK starter package, which you've already downloaded, includes only a single
Scott Main38dea272010-11-01 13:03:25 -0700165component: the latest version of the SDK Tools. To develop an Android
166application, you also need to download at least one Android platform and the SDK Platform-tools
167(tools that the latest platform depend upon). However, downloading
168additional components is highly recommended.</p>
169
Scott Main4fb51ca2010-11-09 14:47:15 -0800170<p>If you used the Windows installer, when you complete the installation wizard, it will launch the
171Android SDK and AVD Manager with a default set of platforms and other components selected
172for you to install. Simply click <strong>Install</strong> to accept the recommended set of
173components and install them. You can then skip to <a href="#sdkContents">Step 5</a>, but we
174recommend you first read the section about the <a href="#components">Available Components</a> to
175better understand the components available from the Android SDK and AVD Manager.</p>
176
Scott Main38dea272010-11-01 13:03:25 -0700177<p>You can launch the Android SDK and AVD Manager in one of the following ways:</p>
178<ul>
179 <li>From within Eclipse, select <strong>Window &gt; Android SDK and AVD Manager</strong>.</li>
180 <li>On Windows, double-click the <code>SDK Manager.ext</code> file at the root of the Android
181SDK directory.</li>
182 <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
Scott Main4fb51ca2010-11-09 14:47:15 -0800183Android SDK, then execute: <pre>android</pre> </li>
Scott Main38dea272010-11-01 13:03:25 -0700184</ul>
185
186<p>To download components, use the graphical UI of the Android SDK and AVD
187Manager, shown in Figure 1, to browse the SDK repository and select new or updated
188components. The Android SDK and AVD Manager will install the selected components in
189your SDK environment. For information about which components you should download, see the following
Scott Main4fb51ca2010-11-09 14:47:15 -0800190section about <a href="#which">Recommended Components</a>.</p>
Scott Main38dea272010-11-01 13:03:25 -0700191
192<img src="/images/sdk_manager_packages.png" />
193<p class="img-caption"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
194<strong>Available Packages</strong> panel, which shows the SDK components that are
195available for you to download into your environment.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700196
Scott Main4fb51ca2010-11-09 14:47:15 -0800197
198<h3 id="components">Available Components</h3>
199
200<p>By default, there are two repositories of components for your SDK: <em>Android
201Repository</em> and <em>Third party Add-ons</em>.</p>
202
203<p>The <em>Android Repository</em> offers these types of components:</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700204
205<ul>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700206<li><strong>SDK Tools</strong> (pre-installed in the Android SDK starter
Scott Main38dea272010-11-01 13:03:25 -0700207package) &mdash; Contains tools for debugging
208and testing your application and other utility tools. You can access these
209in the <code>&lt;sdk&gt;/tools/</code> directory of your SDK and read more about them in the <a
210href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the developer guide. </li>
211
212<li><strong>SDK Platform-tools</strong> &mdash; Contains tools that are required to develop and
213debug your application, but which are developed alongside the Android platform in order to support
214the latest features. These tools are typically updated only when a new platform becomes
215available. You can access these
216in the <code>&lt;sdk&gt;/platform-tools/</code> directory. Read more about them in
217the <a href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the developer guide.
218</li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700219
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700220<li><strong>Android platforms</strong> &mdash; An SDK platform is
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700221available for every production Android platform deployable to Android-powered
222devices. Each platform component includes a fully compliant Android library and
223system image, sample code, emulator skins, and any version specific tools. For
224detailed information about each platform, see the overview documents available
225under the section "Downloadable SDK Components," at left. </li>
226
Scott Main4fb51ca2010-11-09 14:47:15 -0800227<li><strong>USB Driver for Windows</strong> (Windows only) &mdash; Contains driver files
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700228that you can install on your Windows computer, so that you can run and debug
229your applications on an actual device. You <em>do not</em> need the USB driver unless
230you plan to debug your application on an actual Android-powered device. If you
Scott Main06cf15e2010-10-28 00:02:31 -0700231develop on Mac OS X or Linux, you do not need a special driver to debug
Scott Main4fb51ca2010-11-09 14:47:15 -0800232your application on an Android-powered device. (See <a
233href="{@docRoot}guide/developing/device.html">Developing on a Device</a> for more information
234about developing on a real device.)</li>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700235
236<li><strong>Samples</strong> &mdash; Contains the sample code and apps available
237for each Android development platform. If you are just getting started with
238Android development, make sure to download the samples to your SDK. <!--The download
239includes not only a set of very useful sample apps, but also the source for <a
240href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> and other
241tutorials. --></li>
242
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700243<li><strong>Documentation</strong> &mdash; Contains a local copy of the latest
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700244multiversion documentation for the Android framework API. </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700245</ul>
246
Scott Main4fb51ca2010-11-09 14:47:15 -0800247<p>The <em>Third party Add-ons</em> provide components that allow you to create a development
248environment using a specific Android external library (such as the Google Maps library) or a
249customized (but fully compliant) Android system image. You can add additional Add-on repositories,
250by clicking <strong>Add Add-on Site</strong>.</p>
251
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700252
Scott Main38dea272010-11-01 13:03:25 -0700253<h3 id="which">Recommended Components</h3>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700254
255<p>The SDK repository contains a range of components that you can download.
256Use the table below to determine which components you need, based on whether you
Scott Main38dea272010-11-01 13:03:25 -0700257want to set up a basic, recommended, or full development environment:
258</p>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700259
260<table style="width:95%">
261
262<tr>
263<th>Environment</th>
264<th>SDK&nbsp;Component</th>
265<th>Comments</th>
266</tr>
267
268<tr>
Scott Main38dea272010-11-01 13:03:25 -0700269<td rowspan="3" style="font-size:.9em;background-color:#FFE;">Basic</td>
270<td style="font-size:.9em;background-color:#FFE;">SDK Tools</td>
271<td style="font-size:.9em;background-color:#FFE;">If you've just installed
272the SDK starter package, then you already have the latest version of this component. The
273SDK Tools component is required to develop an Android application. Make sure you keep this up to
274date.</td>
275</tr>
276
277<tr>
278<td style="font-size:.9em;background-color:#FFE;">SDK Platform-tools</td>
279<td style="font-size:.9em;background-color:#FFE;">This includes more tools that are required
280for application development. These tools are platform-dependent and typically update only when
281a new SDK platform is made available, in order to support new features in the platform. These
282tools are always backward compatible with older platforms, but you must be sure that you have
283the latest version of these tools when you install a new SDK platform.</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700284</tr>
285
286<tr>
287<td style="font-size:.9em;background-color:#FFE;">SDK platform</td>
288<td style="font-size:.9em;background-color:#FFE;">You need to download <strong
289style="color:red">at least one platform</strong> into your environment, so that
290you will be able to compile your application and set up an Android Virtual
291Device (AVD) to run it on (in the emulator). To start with, just download the
292latest version of the platform. Later, if you plan to publish your application,
293you will want to download other platforms as well, so that you can test your
Scott Main38dea272010-11-01 13:03:25 -0700294application on the full range of Android platform versions that your application supports.</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700295</tr>
296<tr>
Scott Main38dea272010-11-01 13:03:25 -0700297<td colspan="2"
298style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td><td
299style="border:none"></td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700300</tr>
301<tr>
Scott Main38dea272010-11-01 13:03:25 -0700302<td rowspan="3">Recommended<br/>(plus Basic)</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700303<td>Documentation</td>
304<td>The Documentation component is useful because it lets you work offline and
305also look up API reference information from inside Eclipse.</td>
306</tr>
307
308<tr>
309<td>Samples</td>
310<td>The Samples components give you source code that you can use to learn about
311Android, load as a project and run, or reuse in your own app. Note that multiple
312samples components are available &mdash; one for each Android platform version. When
313you are choosing a samples component to download, select the one whose API Level
314matches the API Level of the Android platform that you plan to use.</td>
315</tr>
316<tr>
317<td>Usb Driver</td>
318<td>The Usb Driver component is needed only if you are developing on Windows and
319have an Android-powered device on which you want to install your application for
320debugging and testing. For Mac OS X and Linux platforms, no
321special driver is needed.</td>
322</tr>
323<tr>
Scott Main38dea272010-11-01 13:03:25 -0700324<td colspan="2"
325style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td><td
326style="border:none"></td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700327</tr>
328<tr>
Scott Main38dea272010-11-01 13:03:25 -0700329<td rowspan="3">Full<br/>(plus Recommended)</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700330<td>Google APIs</td>
331<td>The Google APIs add-on gives your application access to the Maps external
332library, which makes it easy to display and manipulate Maps data in your
333application. </td>
334</tr>
335<tr>
336<td>Additional SDK Platforms</td>
337<td>If you plan to publish your application, you will want to download
338additional platforms corresponding to the Android platform versions on which you
339want the application to run. The recommended approach is to compile your
340application against the lowest version you want to support, but test it against
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700341higher versions that you intend the application to run on. You can test your
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700342applications on different platforms by running in an Android Virtual Device
343(AVD) on the Android emulator.</td>
344</tr>
345
346</table>
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700347
Scott Main38dea272010-11-01 13:03:25 -0700348<p>Once you've installed at least the basic configuration of SDK components, you're ready to start
349developing Android apps. The next section describes the contents of the Android SDK to familiarize
350you with the components you've just installed.</p>
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700351
Scott Main38dea272010-11-01 13:03:25 -0700352<p>For more information about using the Android SDK and AVD Manager, see the <a
353href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a> document. </p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700354
355
Scott Main0a21f342010-11-08 12:06:26 -0800356<h2 id="sdkContents">Step 5. Exploring the SDK (Optional)</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700357
358<p>Once you've installed the SDK and downloaded the platforms, documentation,
Scott Main0a21f342010-11-08 12:06:26 -0800359and add-ons that you need, we suggest that you open the SDK directory and take a look at what's
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700360inside.</p>
361
Scott Main06cf15e2010-10-28 00:02:31 -0700362<p>The table below describes the full SDK directory contents, with components
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700363installed. </p>
364
365<table>
366<tr>
367<th colspan="3">Name</th><th>Description</th>
368</tr>
369<tr>
370<td colspan="3"><code>add-ons/</code></td>
371<td>Contains add-ons to the Android SDK development
372environment, which let you develop against external libraries that are available on some
373devices. </td>
Scott Main38dea272010-11-01 13:03:25 -0700374</tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700375<tr>
376<td colspan="3"><code>docs/</code></td>
377<td>A full set of documentation in HTML format, including the Developer's Guide,
Scott Main06cf15e2010-10-28 00:02:31 -0700378API Reference, and other information. To read the documentation, load the
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700379file <code>offline.html</code> in a web browser.</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700380</tr>
381<tr>
Scott Main06cf15e2010-10-28 00:02:31 -0700382<td colspan="3"><code>platform-tools/</code></td>
383<td>Contains development tools that may be updated with each platform release (from the <em>Android
384SDK Platform-tools</em> component). Tools in here include {@code adb}, {@code dexdump}, and others
385others that you don't typically use directly. These tools are separate from the generic development
386tools in the {@code tools/} directory, because these tools may be updated in order to support new
387features in the latest Android platform, whereas the other tools have no dependencies on the
388platform version.</td>
389</tr>
390<tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700391<td colspan="3"><code>platforms/</code></td>
392<td>Contains a set of Android platform versions that you can develop
393applications against, each in a separate directory. </td>
394</tr>
395<tr>
396<td style="width:2em;border-bottom-color:white;"></td>
Scott Main01979992010-04-05 17:42:17 -0700397<td colspan="2"><code><em>&lt;platform&gt;</em>/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700398<td>Platform version directory, for example "android-1.6". All platform version
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700399directories contain a similar set of files and subdirectory structure.</td>
400</tr>
401
402<tr>
403<td style="width:2em;border-bottom-color:white;">&nbsp;</td>
404<td style="width:2em;border-bottom-color:white;"></td>
405<td><code>data/</code></td>
406<td>Storage area for default fonts and resource definitions.</td>
407</tr>
408<tr>
409<td style="width:2em;border-bottom-color:white;"></td>
410<td style="width:2em;border-bottom-color:white;"></td>
411<td><code>images/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700412<td>Storage area for default disk images, including the Android system image,
413the default userdata image, the default ramdisk image, and more. The images
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700414are used in emulator sessions.</td>
415</tr>
416<tr>
417<td style="width:2em;border-bottom-color:white;"></td>
418<td style="width:2em;border-bottom-color:white;"></td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700419<td><code>skins/</code></td>
420<td>A set of emulator skins available for the platform version. Each skin is
421designed for a specific screen resolution.</td>
422</tr>
423<tr>
424<td style="width:2em;border-bottom-color:white;"></td>
425<td style="width:2em;border-bottom-color:white;"></td>
426<td><code>templates/</code></td>
427<td>Storage area for file templates used by the SDK development tools.</td>
428</tr>
429<tr>
430<td style="width:2em;border-bottom-color:white;"></td>
431<td style="width:2em;border-bottom-color:white;"></td>
432<td><code>tools/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700433<td>This directory is used only by SDK Tools r7 and below for development tools that are specific to
434this platform version&mdash;it's not used by SDK Tools r8 and above.</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700435</tr>
436<tr>
437<td style="width:2em;"></td>
438<td style="width:2em;"></td>
439<td><code>android.jar</code></td>
440<td>The Android library used when compiling applications against this platform
441version.</td>
442</tr>
443<tr>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700444<td colspan="3"><code>samples/</code></td>
445<td>Sample code and apps that are specific to platform version.</td>
446</tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700447<td colspan="3"><code>tools/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700448<td>Contains the set of development and profiling tools that are platform-independent, such
Scott Main3165bbb2010-12-16 10:26:23 -0800449as the emulator, the AVD and SDK Manager, ddms, hierarchyviewer and more. The tools in
Scott Main06cf15e2010-10-28 00:02:31 -0700450this directory may be updated at any time (from the <em>Android SDK Tools</em> component),
451independent of platform releases, whereas the tools in {@code platform-tools/} may be updated based
452on the latest platform release.</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700453</tr>
454<tr>
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700455<td colspan="3"><code>SDK Readme.txt</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700456<td>A file that explains how to perform the initial setup of your SDK,
457including how to launch the Android SDK and AVD Manager tool on all
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700458platforms</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700459</tr>
460<tr>
Scott Main06cf15e2010-10-28 00:02:31 -0700461<td colspan="3"><code>SDK Manager.exe</code></td>
462<td>Windows SDK only. A shortcut that launches the Android SDK and AVD
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700463Manager tool, which you use to add components to your SDK. </td>
464</tr>
465<!--<tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700466<td colspan="3"><code>documentation.html</code></td>
467<td>A file that loads the entry page for the local Android SDK
468documentation.</td>
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700469</tr>-->
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700470
471</table>
472
Scott Main4fb51ca2010-11-09 14:47:15 -0800473
474<p>Optionally, you might want to add the location of the SDK's <code>tools/</code> and
475<code>platform-tools</code> to your <code>PATH</code> environment variable, to provide easy
476access to the tools.</p>
477
478
479<div class="toggleable closed">
480 <a href="#" onclick="return toggleDiv(this)">
481 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
482width="9px" />
483 How to update your PATH</a>
484 <div class="toggleme">
485
486<p>Adding both <code>tools/</code> and <code>platform-tools/</code> to your PATH lets you run
487command line <a href="{@docRoot}guide/developing/tools/index.html">tools</a> without needing to
488supply the full path to the tool directories. Depending on your operating system, you can
489include these directories in your PATH in the following way:</p>
490
491<ul>
492
493 <li>On Windows, right-click on My Computer, and select Properties.
494 Under the Advanced tab, hit the Environment Variables button, and in the
495 dialog that comes up, double-click on Path (under System Variables). Add the full path to the
496 <code>tools/</code> and <code>platform-tools/</code> directories to the path. </li>
497
498 <li>On Linux, edit your <code>~/.bash_profile</code> or <code>~/.bashrc</code> file. Look
499 for a line that sets the PATH environment variable and add the
500 full path to the <code>tools/</code> and <code>platform-tools</code> directories to it. If you
501 don't see a line setting the path, you can add one:
502 <pre>export PATH=${PATH}:&lt;sdk&gt;/tools:&lt;sdk&gt;/platform-tools</pre>
503 </li>
504
505 <li>On a Mac OS X, look in your home directory for <code>.bash_profile</code> and
506 proceed as for Linux. You can create the <code>.bash_profile</code> if
507 you don't already have one. </li>
508</ul>
509
510</div><!-- end toggleme -->
511</div><!-- end toggleable -->
512
513
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700514<h2 id="NextSteps">Next Steps</h2>
515<p>Once you have completed installation, you are ready to
516begin developing applications. Here are a few ways you can get started: </p>
517
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700518<p><strong>Set up the Hello World application</strong></p>
519<ul>
Scott Main01979992010-04-05 17:42:17 -0700520 <li>If you have just installed the SDK for the first time, go to the <a
521 href="{@docRoot}resources/tutorials/hello-world.html">Hello
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700522 World tutorial</a>. The tutorial takes you step-by-step through the process
523 of setting up your first Android project, including setting up an Android
Scott Main01979992010-04-05 17:42:17 -0700524 Virtual Device (AVD) on which to run the application.
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700525</li>
526</ul>
527
Scott Main38dea272010-11-01 13:03:25 -0700528<p class="note">Following the Hello World tutorial is an essential
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700529first step in getting started with Android development. </p>
530
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700531<p><strong>Learn about Android</strong></p>
532<ul>
533 <li>Take a look at the <a href="{@docRoot}guide/index.html">Dev
534 Guide</a> and the types of information it provides</li>
535 <li>Read an introduction to Android as a platform in <a
536 href="{@docRoot}guide/basics/what-is-android.html">What is
537 Android?</a></li>
538 <li>Learn about the Android framework and how applications run on it in
539 <a href="{@docRoot}guide/topics/fundamentals.html">Application
540 Fundamentals</a></li>
541 <li>Take a look at the Android framework API specification in the <a
542 href="{@docRoot}reference/packages.html">Reference</a> tab</li>
543</ul>
544
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700545<p><strong>Explore the development tools</strong></p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700546<ul>
547 <li>Get an overview of the <a
548 href="{@docRoot}guide/developing/tools/index.html">development
549 tools</a> that are available to you</li>
550 <li>Read how to develop <a
551 href="{@docRoot}guide/developing/eclipse-adt.html">in Eclipse/ADT</a> or
552 <a href="{@docRoot}guide/developing/other-ide.html">in other IDEs</a>
553 </li>
Scott Main01979992010-04-05 17:42:17 -0700554 <li>Read <a href="{@docRoot}guide/developing/device.html">Developing on a Device</a> to set up an
555Android-powered device to run and test your application.</li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700556</ul>
557
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700558<p><strong>Follow the Notepad tutorial</strong></p>
559
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700560<ul>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700561 <li>The <a href="{@docRoot}resources/tutorials/notepad/index.html">
Scott Main06cf15e2010-10-28 00:02:31 -0700562 Notepad Tutorial</a> shows you how to build a full Android application
563 and provides helpful commentary on the Android system and API. The
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700564 Notepad tutorial helps you bring together the important design
Scott Main06cf15e2010-10-28 00:02:31 -0700565 and architectural concepts in a moderately complex application.
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700566 </li>
567</ul>
Scott Main38dea272010-11-01 13:03:25 -0700568<p class="note">Following the Notepad tutorial is an excellent
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700569second step in getting started with Android development. </p>
570
571<p><strong>Explore some code</strong></p>
572
573<ul>
574 <li>The Android SDK includes sample code and applications for each platform
Scott Main06cf15e2010-10-28 00:02:31 -0700575version. You can browse the samples in the <a
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700576href="{@docRoot}resources/index.html">Resources</a> tab or download them
577into your SDK using the Android SDK and AVD Manager. Once you've downloaded the
578samples, you'll find them in
579<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;/</em></code>. </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700580</ul>
581
582<p><strong>Visit the Android developer groups</strong></p>
583<ul>
584 <li>Take a look at the <a
Dirk Dougherty22558d02009-12-10 16:25:06 -0800585 href="{@docRoot}resources/community-groups.html">Community</a> pages to see a list of
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700586 Android developers groups. In particular, you might want to look at the
587 <a href="http://groups.google.com/group/android-developers">Android
588 Developers</a> group to get a sense for what the Android developer
589 community is like.</li>
590</ul>
591
Dirk Dougherty6b13bc02009-10-30 19:05:53 -0700592<h2 id="troubleshooting">Troubleshooting</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700593
594<h3>Ubuntu Linux Notes</h3>
595
596<ul>
597 <li>If you need help installing and configuring Java on your
Scott Main06cf15e2010-10-28 00:02:31 -0700598 development machine, you might find these resources helpful:
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700599 <ul>
600 <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/Java </a></li>
601 <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/JavaInstallation</a></li>
602 </ul>
603 </li>
604 <li>Here are the steps to install Java and Eclipse, prior to installing
605 the Android SDK and ADT Plugin.
606 <ol>
607 <li>If you are running a 64-bit distribution on your development
608 machine, you need to install the <code>ia32-libs</code> package using
609 <code>apt-get:</code>:
610 <pre>apt-get install ia32-libs</pre>
611 </li>
Scott Mainef4ca452010-04-12 16:05:49 -0700612 <li>Next, install Java: <pre>apt-get install sun-java6-jdk</pre></li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700613 <li>The Ubuntu package manager does not currently offer an Eclipse 3.3
614 version for download, so we recommend that you download Eclipse from
615 eclipse.org (<a
616 href="http://www.eclipse.org/downloads/">http://www.eclipse.org/
617 downloads/</a>). A Java or RCP version of Eclipse is recommended.</li>
Scott Main06cf15e2010-10-28 00:02:31 -0700618 <li>Follow the steps given in previous sections to install the SDK
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700619 and the ADT plugin. </li>
620 </ol>
621 </li>
622</ul>
623
624<h3>Other Linux Notes</h3>
625
626<ul>
627 <li>If JDK is already installed on your development computer, please
628 take a moment to make sure that it meets the version requirements listed
629 in the <a href="requirements.html">System Requirements</a>.
630 In particular, note that some Linux distributions may include JDK 1.4 or Gnu
631 Compiler for Java, both of which are not supported for Android development.</li>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700632</ul>