blob: 2f1918124aafad9e6857c770285244afe5357e2a [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>
57 <li><a href="#components">4. Adding Platforms and Other Components</a>
Scott Main38dea272010-11-01 13:03:25 -070058 <ol>
59 <li><a href="#which">Recommended Components</a></li>
60 </ol></li>
Scott Main0a21f342010-11-08 12:06:26 -080061 <li><a href="#sdkContents">5. Exploring the SDK (Optional)</a></li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070062 <li><a href="#NextSteps">Next Steps</a></li>
63 <li><a href="#troubleshooting">Troubleshooting</a></li>
64 </ol>
65
66<h2>See also</h2>
67 <ol>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -070068 <li><a href="{@docRoot}sdk/eclipse-adt.html">ADT Plugin for Eclipse</a></li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070069 <li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
70 </ol>
71
72</div>
73</div>
74
Scott Main06cf15e2010-10-28 00:02:31 -070075<p>This page describes how to install the Android SDK
Dirk Doughertya374f512009-11-09 11:41:09 -080076and set up your development environment for the first time.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070077
Scott Main06cf15e2010-10-28 00:02:31 -070078<p>If you encounter any problems during installation, see the
Dirk Doughertya250f0c2009-10-22 18:02:45 -070079<a href="#troubleshooting">Troubleshooting</a> section at the bottom of
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070080this page.</p>
81
82<h4>Updating?</h4>
83
Scott Main081127b2010-10-29 15:56:27 -070084<p>If you already have an Android SDK, use the <em>Android SDK and AVD Manager</em> tool to install
85updated tools and new Android platforms into your existing environment. For information about how to
86do that, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070087
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070088
Dirk Dougherty7b229ef2010-03-26 17:32:26 -070089<h2 id="Preparing">Step 1. Preparing Your Development Computer</h2>
90
91<p>Before getting started with the Android SDK, take a moment to confirm that
92your development computer meets the <a href="requirements.html">System
Scott Main081127b2010-10-29 15:56:27 -070093Requirements</a>. In particular, you might need to install the <a
94href="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 -070095
96<p>If you will be developing in Eclipse with the Android Development
Scott Main081127b2010-10-29 15:56:27 -070097Tools (ADT) Plugin&mdash;the recommended path if you are new to
98Android&mdash;make sure that you have a suitable version of Eclipse
Scott Main06cf15e2010-10-28 00:02:31 -070099installed on your computer (3.4 or newer is recommended). If you need
100to install Eclipse, you can download it from this location: </p>
101
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700102<p style="margin-left:2em;"><a href=
Scott Main06cf15e2010-10-28 00:02:31 -0700103"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p>
104
Scott Main081127b2010-10-29 15:56:27 -0700105<p>For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended. Otherwise, a Java or
106RCP version of Eclipse is recommended.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700107
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700108
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700109<h2 id="Installing">Step 2. Downloading the SDK Starter Package</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700110
Scott Main38dea272010-11-01 13:03:25 -0700111<p>The SDK starter package is not a full
Scott Main081127b2010-10-29 15:56:27 -0700112development environment&mdash;it includes only the core SDK Tools, which you can
Scott Main38dea272010-11-01 13:03:25 -0700113use to download the rest of the SDK components (such as the latest Android platform).</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700114
Scott Main0a21f342010-11-08 12:06:26 -0800115<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 -0700116href="{@docRoot}sdk/index.html">SDK download page</a>.</p>
117
118<p>If you downloaded a {@code .zip} or {@code .tgz} package (instead of the SDK installer), unpack
119it to a safe location on your machine. By default, the SDK files are unpacked
120into a directory named <code>android-sdk-&lt;machine-platform&gt;</code>.</p>
Scott Main06cf15e2010-10-28 00:02:31 -0700121
122<p>Make a note of the name and
Scott Main081127b2010-10-29 15:56:27 -0700123location of the unpacked SDK directory on your system&mdash;you will need to
Scott Main06cf15e2010-10-28 00:02:31 -0700124refer to the SDK directory later, when setting up the ADT plugin and when using
125the SDK tools from command line.</p>
126
Scott Main081127b2010-10-29 15:56:27 -0700127<p>Optionally, you might want to add the location of the SDK's
128<code>tools/</code> directory and {@code platform-tools/} directory to your system
Scott Main38dea272010-11-01 13:03:25 -0700129<code>PATH</code>. Both tool directories are located at the root of the SDK folder.
130
131
132<div class="toggleable closed">
133 <a href="#" onclick="return toggleDiv(this)">
134 <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
135width="9px" />
136 How to update your PATH</a>
137 <div class="toggleme">
138
139<p>Adding
Scott Main06cf15e2010-10-28 00:02:31 -0700140<code>tools/</code> and {@code platform-tools/} to your path lets you run Android Debug Bridge (adb)
141and the other command line <a
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700142href="{@docRoot}guide/developing/tools/index.html">tools</a> without needing to
Scott Main06cf15e2010-10-28 00:02:31 -0700143supply the full path to the tool directories. </p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700144
145<ul>
146 <li>On Linux, edit your <code>~/.bash_profile</code> or <code>~/.bashrc</code> file. Look
147 for a line that sets the PATH environment variable and add the
Scott Main06cf15e2010-10-28 00:02:31 -0700148 full path to the <code>tools/</code> and {@code platform-tools/} directories to it. If you don't
Scott Main38dea272010-11-01 13:03:25 -0700149 see a line setting the path, you can add one:
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700150
Scott Main38dea272010-11-01 13:03:25 -0700151 <pre>export PATH=${PATH}:&lt;your_sdk_dir&gt;/tools:&lt;your_sdk_dir&gt;/platform-tools</pre>
152 </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700153
154 <li>On a Mac OS X, look in your home directory for <code>.bash_profile</code> and
Scott Main06cf15e2010-10-28 00:02:31 -0700155 proceed as for Linux. You can create the <code>.bash_profile</code> if
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700156 you haven't already set one up on your machine. </li>
157
Scott Main06cf15e2010-10-28 00:02:31 -0700158 <li>On Windows, right-click on My Computer, and select Properties.
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700159 Under the Advanced tab, hit the Environment Variables button, and in the
Scott Main06cf15e2010-10-28 00:02:31 -0700160 dialog that comes up, double-click on Path (under System Variables). Add the full path to the
161 <code>tools/</code> and {@code platform-tools/} directories to the path. </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700162 </ul>
163
Scott Main38dea272010-11-01 13:03:25 -0700164</div><!-- end toggleme -->
165</div><!-- end toggleable -->
166
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700167
168
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700169<h2 id="InstallingADT">Step 3. Installing the ADT Plugin for Eclipse</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700170
171<p>Android offers a custom plugin for the Eclipse IDE, called Android
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700172Development Tools (ADT), that is designed to give you a powerful, integrated
173environment in which to build Android applications. It extends the capabilites
174of Eclipse to let you quickly set up new Android projects, create an application
Scott Main081127b2010-10-29 15:56:27 -0700175UI, debug your applications
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700176using the Android SDK tools, and even export signed (or unsigned) APKs in order
177to distribute your application. In general, developing in Eclipse with ADT is a
178highly recommended approach and is the fastest way to get started with Android.
179</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700180
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700181<p>If you'd like to use ADT for developing Android applications, install it now.
Scott Main081127b2010-10-29 15:56:27 -0700182Read <a href="{@docRoot}sdk/eclipse-adt.html#installing">Installing the ADT Plugin</a> for
183step-by-step installation instructions, then return here to continue the
184last step in setting up your Android SDK.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700185
Scott Main38dea272010-11-01 13:03:25 -0700186<p>If you prefer to work in a different IDE, you do not need to
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700187install Eclipse or ADT, instead, you can directly use the SDK tools to build and
Scott Main38dea272010-11-01 13:03:25 -0700188debug your application. The developer guide has more information about <a
189href="{@docRoot}guide/developing/other-ide.html">Developing in Other IDEs</a>.</p>
190
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700191
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700192
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700193<h2 id="components">Step 4. Adding Android Platforms and Other Components</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700194
Scott Main081127b2010-10-29 15:56:27 -0700195<p>The last step in setting up your SDK is using the <em>Android SDK and AVD Manager</em> (a
196tool included in the SDK starter package) to download
197essential SDK components into your development environment.</p>
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700198
Scott Main081127b2010-10-29 15:56:27 -0700199<p>The SDK uses a modular structure that separates the major parts of the SDK&mdash;Android platform
200versions, add-ons, tools, samples, and documentation&mdash;into a set of separately installable
201components. The SDK starter package, which you've already downloaded, includes only a single
Scott Main38dea272010-11-01 13:03:25 -0700202component: the latest version of the SDK Tools. To develop an Android
203application, you also need to download at least one Android platform and the SDK Platform-tools
204(tools that the latest platform depend upon). However, downloading
205additional components is highly recommended.</p>
206
207<p>You can launch the Android SDK and AVD Manager in one of the following ways:</p>
208<ul>
209 <li>From within Eclipse, select <strong>Window &gt; Android SDK and AVD Manager</strong>.</li>
210 <li>On Windows, double-click the <code>SDK Manager.ext</code> file at the root of the Android
211SDK directory.</li>
212 <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
213Android SDK, then execute: <pre>android update sdk</pre> <p>This will automatically select
214the required and recommended components for you to install.</p></li>
215</ul>
216
217<p>To download components, use the graphical UI of the Android SDK and AVD
218Manager, shown in Figure 1, to browse the SDK repository and select new or updated
219components. The Android SDK and AVD Manager will install the selected components in
220your SDK environment. For information about which components you should download, see the following
221section about <a href="#which">Recommended Components</a></p>
222
223<img src="/images/sdk_manager_packages.png" />
224<p class="img-caption"><strong>Figure 1.</strong> The Android SDK and AVD Manager's
225<strong>Available Packages</strong> panel, which shows the SDK components that are
226available for you to download into your environment.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700227
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700228<p>The SDK repository offers these types of components:</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700229
230<ul>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700231<li><strong>SDK Tools</strong> (pre-installed in the Android SDK starter
Scott Main38dea272010-11-01 13:03:25 -0700232package) &mdash; Contains tools for debugging
233and testing your application and other utility tools. You can access these
234in the <code>&lt;sdk&gt;/tools/</code> directory of your SDK and read more about them in the <a
235href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the developer guide. </li>
236
237<li><strong>SDK Platform-tools</strong> &mdash; Contains tools that are required to develop and
238debug your application, but which are developed alongside the Android platform in order to support
239the latest features. These tools are typically updated only when a new platform becomes
240available. You can access these
241in the <code>&lt;sdk&gt;/platform-tools/</code> directory. Read more about them in
242the <a href="{@docRoot}guide/developing/tools/index.html">Tools</a> section of the developer guide.
243</li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700244
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700245<li><strong>Android platforms</strong> &mdash; An SDK platform is
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700246available for every production Android platform deployable to Android-powered
247devices. Each platform component includes a fully compliant Android library and
248system image, sample code, emulator skins, and any version specific tools. For
249detailed information about each platform, see the overview documents available
250under the section "Downloadable SDK Components," at left. </li>
251
252<li><strong>SDK Add-Ons</strong> &mdash; SDK add-ons provide a development
253environment for specific Android external
254library or a customized (but fully compliant) Android system image. The Android
255SDK repository offers the Google APIs Add-On, which gives your application
256access to powerful mapping capabilities through the
257<code>com.google.android.maps</code> library. You can also add additional
258repositories, so that you can download other SDK add-ons, where available. </li>
259
Scott Main06cf15e2010-10-28 00:02:31 -0700260<li><strong>USB Driver for Windows</strong> &mdash; Contains driver files
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700261that you can install on your Windows computer, so that you can run and debug
262your applications on an actual device. You <em>do not</em> need the USB driver unless
263you plan to debug your application on an actual Android-powered device. If you
Scott Main06cf15e2010-10-28 00:02:31 -0700264develop on Mac OS X or Linux, you do not need a special driver to debug
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700265your application on an Android-powered device.</li>
266
267<li><strong>Samples</strong> &mdash; Contains the sample code and apps available
268for each Android development platform. If you are just getting started with
269Android development, make sure to download the samples to your SDK. <!--The download
270includes not only a set of very useful sample apps, but also the source for <a
271href="{@docRoot}resources/tutorials/hello-world.html">Hello World</a> and other
272tutorials. --></li>
273
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700274<li><strong>Documentation</strong> &mdash; Contains a local copy of the latest
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700275multiversion documentation for the Android framework API. </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700276</ul>
277
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700278
Scott Main38dea272010-11-01 13:03:25 -0700279<h3 id="which">Recommended Components</h3>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700280
281<p>The SDK repository contains a range of components that you can download.
282Use the table below to determine which components you need, based on whether you
Scott Main38dea272010-11-01 13:03:25 -0700283want to set up a basic, recommended, or full development environment:
284</p>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700285
286<table style="width:95%">
287
288<tr>
289<th>Environment</th>
290<th>SDK&nbsp;Component</th>
291<th>Comments</th>
292</tr>
293
294<tr>
Scott Main38dea272010-11-01 13:03:25 -0700295<td rowspan="3" style="font-size:.9em;background-color:#FFE;">Basic</td>
296<td style="font-size:.9em;background-color:#FFE;">SDK Tools</td>
297<td style="font-size:.9em;background-color:#FFE;">If you've just installed
298the SDK starter package, then you already have the latest version of this component. The
299SDK Tools component is required to develop an Android application. Make sure you keep this up to
300date.</td>
301</tr>
302
303<tr>
304<td style="font-size:.9em;background-color:#FFE;">SDK Platform-tools</td>
305<td style="font-size:.9em;background-color:#FFE;">This includes more tools that are required
306for application development. These tools are platform-dependent and typically update only when
307a new SDK platform is made available, in order to support new features in the platform. These
308tools are always backward compatible with older platforms, but you must be sure that you have
309the latest version of these tools when you install a new SDK platform.</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700310</tr>
311
312<tr>
313<td style="font-size:.9em;background-color:#FFE;">SDK platform</td>
314<td style="font-size:.9em;background-color:#FFE;">You need to download <strong
315style="color:red">at least one platform</strong> into your environment, so that
316you will be able to compile your application and set up an Android Virtual
317Device (AVD) to run it on (in the emulator). To start with, just download the
318latest version of the platform. Later, if you plan to publish your application,
319you will want to download other platforms as well, so that you can test your
Scott Main38dea272010-11-01 13:03:25 -0700320application on the full range of Android platform versions that your application supports.</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700321</tr>
322<tr>
Scott Main38dea272010-11-01 13:03:25 -0700323<td colspan="2"
324style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td><td
325style="border:none"></td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700326</tr>
327<tr>
Scott Main38dea272010-11-01 13:03:25 -0700328<td rowspan="3">Recommended<br/>(plus Basic)</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700329<td>Documentation</td>
330<td>The Documentation component is useful because it lets you work offline and
331also look up API reference information from inside Eclipse.</td>
332</tr>
333
334<tr>
335<td>Samples</td>
336<td>The Samples components give you source code that you can use to learn about
337Android, load as a project and run, or reuse in your own app. Note that multiple
338samples components are available &mdash; one for each Android platform version. When
339you are choosing a samples component to download, select the one whose API Level
340matches the API Level of the Android platform that you plan to use.</td>
341</tr>
342<tr>
343<td>Usb Driver</td>
344<td>The Usb Driver component is needed only if you are developing on Windows and
345have an Android-powered device on which you want to install your application for
346debugging and testing. For Mac OS X and Linux platforms, no
347special driver is needed.</td>
348</tr>
349<tr>
Scott Main38dea272010-11-01 13:03:25 -0700350<td colspan="2"
351style="border:none;text-align:center;font-size:1.5em;font-weight:bold;">+</td><td
352style="border:none"></td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700353</tr>
354<tr>
Scott Main38dea272010-11-01 13:03:25 -0700355<td rowspan="3">Full<br/>(plus Recommended)</td>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700356<td>Google APIs</td>
357<td>The Google APIs add-on gives your application access to the Maps external
358library, which makes it easy to display and manipulate Maps data in your
359application. </td>
360</tr>
361<tr>
362<td>Additional SDK Platforms</td>
363<td>If you plan to publish your application, you will want to download
364additional platforms corresponding to the Android platform versions on which you
365want the application to run. The recommended approach is to compile your
366application against the lowest version you want to support, but test it against
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700367higher versions that you intend the application to run on. You can test your
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700368applications on different platforms by running in an Android Virtual Device
369(AVD) on the Android emulator.</td>
370</tr>
371
372</table>
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700373
Scott Main38dea272010-11-01 13:03:25 -0700374<p>Once you've installed at least the basic configuration of SDK components, you're ready to start
375developing Android apps. The next section describes the contents of the Android SDK to familiarize
376you with the components you've just installed.</p>
Dirk Doughertybf15ce62009-10-23 19:17:12 -0700377
Scott Main38dea272010-11-01 13:03:25 -0700378<p>For more information about using the Android SDK and AVD Manager, see the <a
379href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a> document. </p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700380
381
Scott Main0a21f342010-11-08 12:06:26 -0800382<h2 id="sdkContents">Step 5. Exploring the SDK (Optional)</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700383
384<p>Once you've installed the SDK and downloaded the platforms, documentation,
Scott Main0a21f342010-11-08 12:06:26 -0800385and 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 -0700386inside.</p>
387
Scott Main06cf15e2010-10-28 00:02:31 -0700388<p>The table below describes the full SDK directory contents, with components
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700389installed. </p>
390
391<table>
392<tr>
393<th colspan="3">Name</th><th>Description</th>
394</tr>
395<tr>
396<td colspan="3"><code>add-ons/</code></td>
397<td>Contains add-ons to the Android SDK development
398environment, which let you develop against external libraries that are available on some
399devices. </td>
Scott Main38dea272010-11-01 13:03:25 -0700400</tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700401<tr>
402<td colspan="3"><code>docs/</code></td>
403<td>A full set of documentation in HTML format, including the Developer's Guide,
Scott Main06cf15e2010-10-28 00:02:31 -0700404API Reference, and other information. To read the documentation, load the
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700405file <code>offline.html</code> in a web browser.</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700406</tr>
407<tr>
Scott Main06cf15e2010-10-28 00:02:31 -0700408<td colspan="3"><code>platform-tools/</code></td>
409<td>Contains development tools that may be updated with each platform release (from the <em>Android
410SDK Platform-tools</em> component). Tools in here include {@code adb}, {@code dexdump}, and others
411others that you don't typically use directly. These tools are separate from the generic development
412tools in the {@code tools/} directory, because these tools may be updated in order to support new
413features in the latest Android platform, whereas the other tools have no dependencies on the
414platform version.</td>
415</tr>
416<tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700417<td colspan="3"><code>platforms/</code></td>
418<td>Contains a set of Android platform versions that you can develop
419applications against, each in a separate directory. </td>
420</tr>
421<tr>
422<td style="width:2em;border-bottom-color:white;"></td>
Scott Main01979992010-04-05 17:42:17 -0700423<td colspan="2"><code><em>&lt;platform&gt;</em>/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700424<td>Platform version directory, for example "android-1.6". All platform version
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700425directories contain a similar set of files and subdirectory structure.</td>
426</tr>
427
428<tr>
429<td style="width:2em;border-bottom-color:white;">&nbsp;</td>
430<td style="width:2em;border-bottom-color:white;"></td>
431<td><code>data/</code></td>
432<td>Storage area for default fonts and resource definitions.</td>
433</tr>
434<tr>
435<td style="width:2em;border-bottom-color:white;"></td>
436<td style="width:2em;border-bottom-color:white;"></td>
437<td><code>images/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700438<td>Storage area for default disk images, including the Android system image,
439the default userdata image, the default ramdisk image, and more. The images
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700440are used in emulator sessions.</td>
441</tr>
442<tr>
443<td style="width:2em;border-bottom-color:white;"></td>
444<td style="width:2em;border-bottom-color:white;"></td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700445<td><code>skins/</code></td>
446<td>A set of emulator skins available for the platform version. Each skin is
447designed for a specific screen resolution.</td>
448</tr>
449<tr>
450<td style="width:2em;border-bottom-color:white;"></td>
451<td style="width:2em;border-bottom-color:white;"></td>
452<td><code>templates/</code></td>
453<td>Storage area for file templates used by the SDK development tools.</td>
454</tr>
455<tr>
456<td style="width:2em;border-bottom-color:white;"></td>
457<td style="width:2em;border-bottom-color:white;"></td>
458<td><code>tools/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700459<td>This directory is used only by SDK Tools r7 and below for development tools that are specific to
460this platform version&mdash;it's not used by SDK Tools r8 and above.</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700461</tr>
462<tr>
463<td style="width:2em;"></td>
464<td style="width:2em;"></td>
465<td><code>android.jar</code></td>
466<td>The Android library used when compiling applications against this platform
467version.</td>
468</tr>
469<tr>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700470<td colspan="3"><code>samples/</code></td>
471<td>Sample code and apps that are specific to platform version.</td>
472</tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700473<td colspan="3"><code>tools/</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700474<td>Contains the set of development and profiling tools that are platform-independent, such
475as the emulator, the AVD and SDK Manager, adb, ddms, hierarchyviewer and more. The tools in
476this directory may be updated at any time (from the <em>Android SDK Tools</em> component),
477independent of platform releases, whereas the tools in {@code platform-tools/} may be updated based
478on the latest platform release.</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700479</tr>
480<tr>
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700481<td colspan="3"><code>SDK Readme.txt</code></td>
Scott Main06cf15e2010-10-28 00:02:31 -0700482<td>A file that explains how to perform the initial setup of your SDK,
483including how to launch the Android SDK and AVD Manager tool on all
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700484platforms</td>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700485</tr>
486<tr>
Scott Main06cf15e2010-10-28 00:02:31 -0700487<td colspan="3"><code>SDK Manager.exe</code></td>
488<td>Windows SDK only. A shortcut that launches the Android SDK and AVD
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700489Manager tool, which you use to add components to your SDK. </td>
490</tr>
491<!--<tr>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700492<td colspan="3"><code>documentation.html</code></td>
493<td>A file that loads the entry page for the local Android SDK
494documentation.</td>
Dirk Doughertyeeb0b252009-10-22 16:08:32 -0700495</tr>-->
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700496
497</table>
498
499<h2 id="NextSteps">Next Steps</h2>
500<p>Once you have completed installation, you are ready to
501begin developing applications. Here are a few ways you can get started: </p>
502
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700503<p><strong>Set up the Hello World application</strong></p>
504<ul>
Scott Main01979992010-04-05 17:42:17 -0700505 <li>If you have just installed the SDK for the first time, go to the <a
506 href="{@docRoot}resources/tutorials/hello-world.html">Hello
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700507 World tutorial</a>. The tutorial takes you step-by-step through the process
508 of setting up your first Android project, including setting up an Android
Scott Main01979992010-04-05 17:42:17 -0700509 Virtual Device (AVD) on which to run the application.
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700510</li>
511</ul>
512
Scott Main38dea272010-11-01 13:03:25 -0700513<p class="note">Following the Hello World tutorial is an essential
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700514first step in getting started with Android development. </p>
515
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700516<p><strong>Learn about Android</strong></p>
517<ul>
518 <li>Take a look at the <a href="{@docRoot}guide/index.html">Dev
519 Guide</a> and the types of information it provides</li>
520 <li>Read an introduction to Android as a platform in <a
521 href="{@docRoot}guide/basics/what-is-android.html">What is
522 Android?</a></li>
523 <li>Learn about the Android framework and how applications run on it in
524 <a href="{@docRoot}guide/topics/fundamentals.html">Application
525 Fundamentals</a></li>
526 <li>Take a look at the Android framework API specification in the <a
527 href="{@docRoot}reference/packages.html">Reference</a> tab</li>
528</ul>
529
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700530<p><strong>Explore the development tools</strong></p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700531<ul>
532 <li>Get an overview of the <a
533 href="{@docRoot}guide/developing/tools/index.html">development
534 tools</a> that are available to you</li>
535 <li>Read how to develop <a
536 href="{@docRoot}guide/developing/eclipse-adt.html">in Eclipse/ADT</a> or
537 <a href="{@docRoot}guide/developing/other-ide.html">in other IDEs</a>
538 </li>
Scott Main01979992010-04-05 17:42:17 -0700539 <li>Read <a href="{@docRoot}guide/developing/device.html">Developing on a Device</a> to set up an
540Android-powered device to run and test your application.</li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700541</ul>
542
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700543<p><strong>Follow the Notepad tutorial</strong></p>
544
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700545<ul>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700546 <li>The <a href="{@docRoot}resources/tutorials/notepad/index.html">
Scott Main06cf15e2010-10-28 00:02:31 -0700547 Notepad Tutorial</a> shows you how to build a full Android application
548 and provides helpful commentary on the Android system and API. The
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700549 Notepad tutorial helps you bring together the important design
Scott Main06cf15e2010-10-28 00:02:31 -0700550 and architectural concepts in a moderately complex application.
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700551 </li>
552</ul>
Scott Main38dea272010-11-01 13:03:25 -0700553<p class="note">Following the Notepad tutorial is an excellent
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700554second step in getting started with Android development. </p>
555
556<p><strong>Explore some code</strong></p>
557
558<ul>
559 <li>The Android SDK includes sample code and applications for each platform
Scott Main06cf15e2010-10-28 00:02:31 -0700560version. You can browse the samples in the <a
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700561href="{@docRoot}resources/index.html">Resources</a> tab or download them
562into your SDK using the Android SDK and AVD Manager. Once you've downloaded the
563samples, you'll find them in
564<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;/</em></code>. </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700565</ul>
566
567<p><strong>Visit the Android developer groups</strong></p>
568<ul>
569 <li>Take a look at the <a
Dirk Dougherty22558d02009-12-10 16:25:06 -0800570 href="{@docRoot}resources/community-groups.html">Community</a> pages to see a list of
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700571 Android developers groups. In particular, you might want to look at the
572 <a href="http://groups.google.com/group/android-developers">Android
573 Developers</a> group to get a sense for what the Android developer
574 community is like.</li>
575</ul>
576
Dirk Dougherty6b13bc02009-10-30 19:05:53 -0700577<h2 id="troubleshooting">Troubleshooting</h2>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700578
579<h3>Ubuntu Linux Notes</h3>
580
581<ul>
582 <li>If you need help installing and configuring Java on your
Scott Main06cf15e2010-10-28 00:02:31 -0700583 development machine, you might find these resources helpful:
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700584 <ul>
585 <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/Java </a></li>
586 <li><a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/JavaInstallation</a></li>
587 </ul>
588 </li>
589 <li>Here are the steps to install Java and Eclipse, prior to installing
590 the Android SDK and ADT Plugin.
591 <ol>
592 <li>If you are running a 64-bit distribution on your development
593 machine, you need to install the <code>ia32-libs</code> package using
594 <code>apt-get:</code>:
595 <pre>apt-get install ia32-libs</pre>
596 </li>
Scott Mainef4ca452010-04-12 16:05:49 -0700597 <li>Next, install Java: <pre>apt-get install sun-java6-jdk</pre></li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700598 <li>The Ubuntu package manager does not currently offer an Eclipse 3.3
599 version for download, so we recommend that you download Eclipse from
600 eclipse.org (<a
601 href="http://www.eclipse.org/downloads/">http://www.eclipse.org/
602 downloads/</a>). A Java or RCP version of Eclipse is recommended.</li>
Scott Main06cf15e2010-10-28 00:02:31 -0700603 <li>Follow the steps given in previous sections to install the SDK
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700604 and the ADT plugin. </li>
605 </ol>
606 </li>
607</ul>
608
609<h3>Other Linux Notes</h3>
610
611<ul>
612 <li>If JDK is already installed on your development computer, please
613 take a moment to make sure that it meets the version requirements listed
614 in the <a href="requirements.html">System Requirements</a>.
615 In particular, note that some Linux distributions may include JDK 1.4 or Gnu
616 Compiler for Java, both of which are not supported for Android development.</li>
Dirk Dougherty7b229ef2010-03-26 17:32:26 -0700617</ul>