summaryrefslogtreecommitdiffstats
path: root/docs/html/sdk/updating-sdk.jd
blob: db1e8db8e75b2992855c60030b8a9d158a269f7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
page.title=Updating Your SDK
@jd:body


<div id="qv-wrapper">
<div id="qv">
<h2>Quick view</h2>
<ul>
  <li>Use the Android SDK and AVD Manager to 
   keep your SDK up-to-date without having to install new
   SDK directories.</li>
  <li>The Android SDK and AVD Manager is available only with the 
   Android 1.6 SDK or later.</li>
  <li>The Eclipse ADT plugin may require an update when installing
   new tools or system images.</li>
</ul>

<h2>In this document</h2>
<ol>
  <li><a href="#InstallingComponents">Installing SDK Components</a>
    <ol>
      <li><a href="#AddingSites">Adding New Sites</a></li>
    </ol>
  </li>
  <li><a href="#UpdatingAdt">Updating the Eclipse ADT Plugin</a></li>
</ol>
</div>
</div>


<p>Updating your Android SDK is fast and easy. To perform an update, use the
<strong>Android SDK and AVD Manager</strong>
to install or update the individual SDK components that you need.</p>

<p>It only takes a couple of clicks to install
individual versions of the Android platform, new development tools, new documentation, and
SDK add-ons. The new SDK components are automatically installed into your existing SDK 
directory, so you don't need to update your development environment to specify a
new SDK location.</p>

<p>Because each version of the Android platform can be installed as an individual component
of your SDK, you can customize your development environment to the Android platforms
you are targetting. Testing your app on multiple versions of
the platform is very important in order to successfully operate on as many devices as possible.
Be sure to install each version of the Android platform with which your app is compatible, then test
your apps on <a href="{@docRoot}guide/developing/tools/avd.html">AVDs</a> that run each platform.</p>

<p>If you develop applications using Eclipse, you may also need to update
your ADT plugin when you update your development tools or in order to compile
against a new version of the platform. See the 
<a href="{@docRoot}sdk/RELEASENOTES.html">SDK Release Notes</a> for ADT compatibility.</p>



<h2 id="InstallingComponents">Installing SDK Components</h2>

<p>Use the Android SDK and AVD Manager to install new SDK components. 
To launch the SDK and AVD Manager:</p>
<ul>
  <li>Execute the <a 
  href="{@docRoot}guide/developing/tools/othertools.html#android">{@code android}</a> tool
  command with no options.</li>
  <li>Or from Eclipse, select <strong>Window</strong> &gt;<strong>Android SDK and AVD
  Manager</strong>.</li>
</ul>

<img src="{@docRoot}images/sdk_manager_packages.png" alt="" style="float:right" />

<p>When a new platform version, add-on, set of development tools or
documentation becomes available, you can quickly
install them into your existing Android SDK:</p>

<ol>
  <li>Select <strong>Available Components</strong> in the left panel.
  This will reveal all components currently available for download.</li>
  <li>Select the components you'd like to install and click <strong>Install
  Selected</strong>.</li>
  <li>Verify and accept the components you want and click <strong>Install
  Accepted</strong>. The components will now be installed into your existing
  Android SDK directories.</li>
</ol>

<p>New platforms are automatically saved into the 
<code><em>&lt;sdk>/</em>platforms/</code> directory of your SDK;
new add-ons are saved in the <code><em>&lt;sdk>/</em>add-ons/</code>
directory; and new documentation is saved in the existing
<code><em>&lt;sdk>/</em>docs/</code> directory (old docs are replaced).</p>

<p class="note"><strong>Tip:</strong>
Use the "Display updates only" checkbox to show only the components
you do not have.</p>


<h3 id="AddingSites">Adding New Sites</h3>

<p>By default, <strong>Available Components</strong> only shows 
the Google repository for Android SDK components and Google API
add-ons. You can add additional sites that host
Android SDK add-ons, then download SDK add-ons from them.</p>	

<p>For example, a mobile carrier or hardware manufacturer may offer additional
API libraries that are supported by their own Android-powered devices. 
In order to develop using their libraries, you must install their
Android SDK add-on.
If the carrier or manufacturer has hosted an add-on repository file on their
web site, add their site to the SDK and AVD Manager:</p>
<ol>
  <li>Select <strong>Available Components</strong> in the left panel.</li>
  <li>Click <strong>Add Site</strong> and enter the URL of the 
{@code repository.xml} file. Click <strong>OK</strong>.</li>
</ol>
<p>Any SDK components available from the site will now be listed under
<strong>Available Components</strong>.</p>





<h2 id="UpdatingAdt">Updating the Eclipse ADT Plugin</h2>

<p>You may need to update your ADT plugin depending on what version of the
development tools you are using and what version of the Android platform you are
compiling against. It's easy to update your plugin through Eclipse and we
recommend that you stay up-to-date in order to avoid any problems.</p>

<p>With the latest version of ADT, you can still compile existing applications against 
previous versions of the Android platform. However, the latest ADT may
not work with a previous version of the development tools. See the
Android development tools release notes for compatibility information.</p>

<p>To update ADT, follow the procedure below for your respective version of Eclipse.</p>

<table style="font-size:100%">
<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
<tr>
<td width="50%">
<!-- 3.4 steps -->
<ol>
    <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong>.</li>
    <li>Select the <strong>Available Software</strong> tab.</li>
    <li>Select the checkboxes next to Android DDMS and Android Developer Tools, 
      then click  <strong>Update</strong>.</li>
    <li>In the resulting Available Updates dialog, ensure that both Android DDMS 
      and Android Development Tools are selected, then click 
      <strong>Next</strong>.</li>
    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
      This will download and install the latest version of Android DDMS and 
      Android Development Tools.</li>
    <li>Restart Eclipse.</li>
</ol>
</td>
<td>
<!-- 3.5 steps -->
<ol>
    <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>. </li>
    <li>In the resulting Available Updates dialog, locate the Android DDMS and 
        Android Development Tools features in the list and ensure that the checkboxes
        next to them are selected. Click <strong>Next</strong>. 
        <p>If the Available Updates dialog does not list Android DDMS and Android 
           Development tools, make sure that you have set up a remote update site 
           for them, as described in 
           <a href="installing.html#InstallingADT">Installing the ADT Plugin</a>. 
        </p></li>
    <li>In the Update Details dialog, click <strong>Next</strong>.</li>
    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
      This will download and install the latest version of Android DDMS and 
      Android Development Tools.</li>
    <li>Restart Eclipse.</li>
</ol>
</td>
</tr>
</table>

<p>If you encounter problems with this update procedure, try performing a fresh
installation. Fully remove your existing ADT Plugin as described in <a
href="{@docRoot}sdk/1.5_r3/upgrading.html#uninstallAdt">Uninstall your previous
ADT plugin</a> and then follow the guide to <a
href="{@docRoot}sdk/{@sdkCurrent}/installing.html#InstallingADT">Installing the ADT Plugin for
Eclipse</a>.</p>