• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Exploring the SDK
2walkthru=1
3
4@jd:body
5
6
7<p>The Android SDK is composed of modular packages that you can download separately using
8the Android SDK Manager. For example, when the SDK Tools are updated or a new version of
9the Android platform is released, you can use the SDK Manager to quickly download them to
10your environment. Simply follow the procedures described in <a
11href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>
12
13<p>There are several different packages available for the Android SDK. The table below describes
14most of the available packages and where they're located once you download them.</p>
15
16
17<h2 id="Packages">Available Packages</h2>
18
19
20<table>
21  <tr><th>Package</th><th>Description</th><th>File Location</th></tr>
22  <tr>
23    <td><a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools</a></td>
24    <td>Contains tools for debugging and testing, plus other
25utilities that are required to develop an app. If you've just installed the SDK starter package,
26then you already have the latest version of this package. Make sure you keep this up to date.</td>
27    <td>{@code &lt;sdk>/tools/}</td></tr>
28  <tr><td>SDK Platform-tools</td>
29    <td>Contains platform-dependent tools for developing and debugging
30your application. These tools support the latest features of the Android platform and are typically
31updated only when a new platform becomes available. These tools are always backward compatible with
32older platforms, but you must be sure that you have the latest version of these tools when you
33install a new SDK platform.</td>
34    <td>{@code &lt;sdk>/platform-tools/}</td>
35  </tr>
36
37  <tr>
38    <td>Documentation</td>
39    <td>An offline copy of the latest documentation for the Android
40platform APIs.</td>
41    <td>{@code &lt;sdk>/docs/}</td>
42  </tr>
43  <tr><td>SDK Platform</td>
44    <td>There's one SDK Platform available for each version of Android. It includes an {@code
45android.jar} file with a fully compliant Android library. In order to build an Android app, you must
46specify an SDK platform as your build target.</td>
47    <td>{@code &lt;sdk>/platforms/&lt;android-version>/}</td>
48  </tr>
49  <tr>
50    <td>System Images</td>
51    <td>Each platform version offers one or more different system images (such as for ARM
52and x86). The Android emulator requires a system image to operate. You should always test your
53app on the latest version of Android and using the emulator with the latest system image is a
54good way to do so.</td>
55    <td>{@code &lt;sdk>/platforms/&lt;android-version>/}</td>
56  </tr>
57  <tr>
58    <td>Sources for Android SDK</td>
59    <td>A copy of the Android platform source code that's useful for
60stepping through the code while debugging your app.</td>
61    <td>{@code &lt;sdk>/sources/}</td>
62  </tr>
63  <tr>
64    <td><a href="{@docRoot}tools/samples/index.html">Samples for SDK</a></td>
65    <td>A collection of sample apps that demonstrate a variety of the
66platform APIs. These are a great resource to browse Android app code. The API Demos app in
67particular provides a huge number of small demos you should explore.</td>
68    <td>{@code &lt;sdk>/platforms/&lt;android-version>/samples/}</td>
69  </tr>
70  <tr>
71    <td><a href="http://developers.google.com/android">Google APIs</a></td>
72    <td>An SDK add-on that provides both a platform you can use to develop an app
73using special Google APIs and a system image for the emulator so you can test your app using the
74Google APIs.</td>
75    <td>{@code &lt;sdk>/add-ons/}</td>
76  </tr>
77
78  <tr>
79    <td><a href="{@docRoot}tools/extras/support-library.html">Android Support</a></td>
80    <td>A static library you can include in your app sources in order to use powerful
81APIs that aren't available in the standard platform. For example, the support library
82contains versions of the {@link android.support.v4.app.Fragment} class that's compatible with
83Android 1.6 and higher (the class was originally introduced in Android 3.0) and the {@link
84android.support.v4.view.ViewPager} APIs that allow you to easily build a side-swipeable UI.</td>
85    <td>{@code &lt;sdk>/extras/android/support/}</td>
86  </tr>
87  <tr>
88    <td><a href="{@docRoot}google/play/billing/index.html">Google Play Billing</a></td>
89    <td>Provides the static libraries and samples that allow you to
90integrate billing services in your app with Google Play.</td>
91    <td>{@code &lt;sdk>/extras/google/}</td>
92  </tr>
93  <tr>
94    <td><a href="{@docRoot}google/play/licensing/index.html">Google Play Licensing</a></td>
95    <td>Provides the static libraries and samples that allow you to perform license verification for
96your app when distributing with Google Play.</td>
97    <td>{@code &lt;sdk>/extras/google/}</td>
98  </tr>
99</table>
100
101<p>The above table is not comprehensive and you can <a
102href="#AddingSites">add new sites</a> to download additional packages from third-parties.</p>
103
104<p>In some cases, an SDK package may require a specific minimum revision of
105another package or SDK tool. For example, there may be a dependency between the ADT Plugin for
106Eclipse and
107the SDK Tools package. When you install the SDK Tools
108package, you should also upgrade to the required version of ADT (if you
109are developing in Eclipse). In this case,  the major version number for your ADT plugin should
110always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
111</p>
112
113<p>The development tools will notify you with debug warnings if there is dependency that you need to
114address. The Android SDK Manager also enforces dependencies by requiring that you download any
115packages that are needed by those you have selected.</p>
116
117
118
119
120
121<h2 id="AddingSites">Adding New Sites</h2>
122
123<p>By default, <strong>Available Packages</strong> displays packages available from the
124<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
125their own Android SDK add-ons, then download the SDK add-ons
126from those sites.</p>
127
128<p>For example, a mobile carrier or device manufacturer might offer additional
129API libraries that are supported by their own Android-powered devices. In order
130to develop using their libraries, you must install their Android SDK add-on, if it's not already
131available under <em>Third party Add-ons</em>. </p>
132
133<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
134on their web site, follow these steps to add their site to the Android SDK
135Manager:</p>
136
137<ol>
138  <li>Select <strong>Available Packages</strong> in the left panel.</li>
139  <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
140<code>repository.xml</code> file. Click <strong>OK</strong>.</li>
141</ol>
142<p>Any SDK packages available from the site will now be listed under a new item named
143<strong>User Add-ons</strong>.</p>
144
145
146
147
148<h2 id="troubleshooting">Troubleshooting</h2>
149
150<p><strong>Problems connecting to the SDK repository</strong></p>
151
152<p>If you are using the Android SDK Manager to download packages and are encountering
153connection problems, try connecting over http, rather than https. To switch the
154protocol used by the Android SDK Manager, follow these steps: </p>
155
156<ol>
157  <li>With the Android SDK Manager window open, select "Settings" in the
158  left pane. </li>
159  <li>On the right, in the "Misc" section, check the checkbox labeled "Force
160  https://... sources to be fetched using http://..." </li>
161  <li>Click <strong>Save &amp; Apply</strong>.</li>
162</ol>
163
164
165
166
167