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