blob: 1d99c91b2914d81b772ce10520ded24e8de00893 [file] [log] [blame]
Dirk Doughertybf15ce62009-10-23 19:17:12 -07001page.title=Installing and Updating ADT
Dirk Doughertyee58d1b2009-10-16 15:25:15 -07002sdk.preview=0
3
4@jd:body
5
6<div id="qv-wrapper">
7<div id="qv">
8
9 <h2>In this document</h2>
10 <ol>
11 <li><a href="#preparing">Prepare for Installation</a></li>
12 <li><a href="#installing">Installing the ADT Plugin</a>
13 <ol>
14 <li><a href="#troubleshooting">Troubleshooting</a></li>
15 </ol>
16 </li>
17 <li><a href="#updating">Updating the ADT Plugin</a></li>
18 <li><a href="#uninstalling">Uninstalling the ADT Plugin</a></li>
19 </ol>
20
21</div>
22</div>
23
24<p>Android offers a custom plugin for the Eclipse IDE, called Android
25Development Tools (ADT), that is designed to give you a powerful,
Dirk Doughertybf15ce62009-10-23 19:17:12 -070026integrated environment in which to build Android applications. </p>
27
Scott Main13244e52010-01-19 11:12:07 -080028<p>ADT extends the capabilities of Eclipse to let you quickly set up new Android
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070029projects, create an application UI, add components based on the Android
Dirk Doughertybf15ce62009-10-23 19:17:12 -070030Framework API, debug your applications using the Android SDK tools, and even
31export signed (or unsigned) APKs in order to distribute your application.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070032
33<p>In general, using Eclipse with ADT is a highly recommended approach to
Dirk Doughertybf15ce62009-10-23 19:17:12 -070034Android development and is the fastest way to get started. If you use Eclipse,
35the ADT plugin gives you an incredible boost in developing Android
36applications.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070037
Dirk Doughertybf15ce62009-10-23 19:17:12 -070038<p>To install and update the ADT Plugin, you can take advantage of the Eclipse
39remote update feature. By setting up a remote update site, you can easily
40download, install, and check for ADT updates. Alternatively, you can download
41the latest ADT to your development computer as a local site archive. The
42sections below provide instructions for both methods.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070043
44
45<h2 id="preparing">Prepare for Installation</h2>
46
47<p>Before you begin, take a moment to confirm that your development machine
48meets the <a href="requirements.html">System Requirements</a>.</p>
49
50<p>If you will be developing in Eclipse with the Android Development
51Tools (ADT) Plugin &mdash; the recommended path if you are new to
52Android &mdash; make sure that you have a suitable version of Eclipse
53installed on your computer (3.4 or newer is recommended). If you need
54to install Eclipse, you can download it from this location: </p>
55
Dirk Dougherty22558d02009-12-10 16:25:06 -080056<p style="margin-left:2em;"><a href=
57"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>
58</p>
59
60<p>A Java or RCP version of Eclipse is recommended. </p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070061
62<h2 id="installing">Installing the ADT Plugin</h2>
63
64<p>Once you have the Eclipse IDE installed, as described in <a
65href="#preparing">Preparing for Installation</a>, above, follow these steps to
66download the ADT plugin and install it in your respective Eclipse environment.
67</p>
68
69<table style="font-size:100%">
70<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
71<tr>
72<td width="45%">
73<!-- 3.4 steps -->
74<ol>
75 <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Software Updates...</strong>.
76 In the dialog that appears, click the <strong>Available Software</strong> tab. </li>
77 <li>Click <strong>Add Site...</strong> </li>
78 <li>In the Add Site dialog that appears, enter this URL in the "Location" field:
79 <pre style="margin-left:0">https://dl-ssl.google.com/android/eclipse/</pre>
Scott Main13244e52010-01-19 11:12:07 -080080 <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070081 instead of "https" (https is preferred for security reasons).</p>
82 <p>Click <strong>OK</strong>.</p></li>
83 <li>Back in the Available Software view, you should see the plugin listed by the URL,
84 with "Developer Tools" nested within it. Select the checkbox next to
85 Developer Tools and click <strong>Install...</strong></li>
86 <li>On the subsequent Install window, "Android DDMS" and "Android Development Tools"
87 should both be checked. Click <strong>Next</strong>. </li>
88 <li>Read and accept the license agreement, then click <strong>Finish</strong>.</li>
89 <li>Restart Eclipse. </li>
90</ol>
91
92</td>
93<td>
94<!-- 3.5 steps -->
95<ol>
96 <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install
Scott Main13244e52010-01-19 11:12:07 -080097 New Software</strong>. </li>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -070098 <li>In the Available Software dialog, click <strong>Add...</strong>.</li>
99 <li>In the Add Site dialog that appears, enter a name for the remote site
100 (for example, "Android Plugin") in the "Name" field.
101 <p>In the "Location" field, enter this URL:</p>
102 <pre>https://dl-ssl.google.com/android/eclipse/</pre>
Scott Main13244e52010-01-19 11:12:07 -0800103 <p>Note: If you have trouble acquiring the plugin, you can try
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700104 using "http" in the URL, instead of "https" (https is preferred for
105 security reasons).</p>
106 <p>Click <strong>OK</strong>.</p>
107 </li>
108 <li>Back in the Available Software view, you should now see "Developer
109 Tools" added to the list. Select the checkbox next to Developer Tools,
110 which will automatically select the nested tools Android DDMS and Android
111 Development Tools.
112 Click <strong>Next</strong>. </li>
113 <li>In the resulting Install Details dialog, the Android DDMS and Android
114 Development Tools features are listed. Click <strong>Next</strong> to
115 read and accept the license agreement and install any dependencies,
116 then click <strong>Finish</strong>. </li>
117 <li>Restart Eclipse. </li>
118
119</ol>
120</td>
121</tr>
122</table>
123
124<p>Now modify your Eclipse preferences to point to the Android SDK directory:</p>
125<ol>
126 <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
127 panel (Mac OS X: <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
128 <li>Select <strong>Android</strong> from the left panel. </li>
129 <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
130 locate your downloaded SDK directory. </li>
131 <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
132</ol>
133
134<p>Done! If you haven't encountered any problems, then you're ready to
135begin developing Android applications. </p>
136
137
138<h3 id="troubleshooting">Troubleshooting ADT Installation</h3>
139
140<p> If you are having trouble downloading the ADT plugin after following the
141steps above, here are some suggestions: </p>
142
143<ul>
144 <li>If Eclipse can not find the remote update site containing the ADT plugin,
145try changing the remote site URL to use http, rather than https. That is, set
146the Location for the remote site to:
147<pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
148<li>If you are behind a firewall (such as a corporate firewall), make sure that
149you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4,
150you can configure proxy information from the main Eclipse menu in
151<strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
152<strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
153Connections</strong>.</li>
154</ul>
155
156<p> If you are still unable to use Eclipse to download the ADT plugin as a
157remote update site, you can download the ADT zip file to your local machine and
158manually install it:</p>
159
160<ol>
161 <li>Download the current ADT Plugin zip file from the table below (do not unpack it).
162
163 <table class="download">
164 <tr>
165 <th>Name</th>
166 <th>Package</th>
167 <th>Size</th>
168 <th>MD5 Checksum</th>
169 </tr>
170 <tr>
171 <td>ADT {@adtZipVersion}</td>
172 <td>
173 <a href="http://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
174 </td>
175 <td>{@adtZipBytes} bytes</td>
176 <td>{@adtZipChecksum}</td>
177 </tr>
178</table>
179</li>
180
181</li>
182 <li>Follow steps 1 and 2 in the <a href="#InstallingADT">default install
183 instructions</a> (above).</li>
184 <li>In the Add Site dialog, click <strong>Archive</strong>.</li>
185 <li>Browse and select the downloaded zip file.</li>
186 <li>In Eclipse 3.5 only, enter a name for the local update site (e.g.,
187 "Android Plugin") in the "Name" field.</li>
188 <li>Click <strong>OK</strong>.
189 <li>Follow the remaining procedures as listed for
190 <a href="#InstallingADT">default installation</a> above,
191 starting from step 4.</li>
192</ol>
193
194<p>To update your plugin once you've installed using the zip file, you will have
195to follow these steps again instead of the default update instructions.</p>
196
197<h4>Other install errors</h4>
198
199<p>Note that there are features of ADT that require some optional
200Eclipse components (for example, WST). If you encounter an error when
201installing ADT, your Eclipse installion might not include these components.
202For information about how to quickly add the necessary components to your
203Eclipse installation, see the troubleshooting topic
Dirk Dougherty22558d02009-12-10 16:25:06 -0800204<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700205Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
206
207<h4>For Linux users</h4>
208<p>If you encounter this error when installing the ADT Plugin for Eclipse:
209<pre>
210An error occurred during provisioning.
211Cannot connect to keystore.
212JKS</pre>
213<p>
214...then your development machine lacks a suitable Java VM. Installing Sun
215Java 6 will resolve this issue and you can then reinstall the ADT
216Plugin.</p>
217
218
219<h2 id="updating">Updating Your Eclipse ADT Plugin</h2>
220
221<p>From time to time, a new version of the ADT Plugin becomes available. Follow
222the steps below to check whether an update is available and, if so, to install it.
223For
224information about new features in ADT, see the <a
225href="{@docRoot}sdk/adt-notes.html">ADT Plugin Notes</a> document. </p>
226
227<table style="font-size:100%">
228<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
229<tr>
230<td width="50%">
231<!-- 3.4 steps -->
232<ol>
233 <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong>.</li>
234 <li>Select the <strong>Available Software</strong> tab.</li>
235 <li>Select the checkboxes next to Android DDMS and Android Developer Tools,
236 then click <strong>Update</strong>.</li>
237 <li>In the resulting Available Updates dialog, ensure that both Android DDMS
238 and Android Development Tools are selected, then click
239 <strong>Next</strong>.</li>
240 <li>Read and accept the license agreement and then click <strong>Finish</strong>.
241 This will download and install the latest version of Android DDMS and
242 Android Development Tools.</li>
243 <li>Restart Eclipse.</li>
244</ol>
245</td>
246<td>
247<!-- 3.5 steps -->
248<ol>
249 <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>. </li>
250 <li>In the resulting Available Updates dialog, locate the Android DDMS and
251 Android Development Tools features in the list and ensure that the checkboxes
252 next to them are selected. Click <strong>Next</strong>.
253 <p>If the Available Updates dialog does not list Android DDMS and Android
254 Development tools, make sure that you have set up a remote update site
255 for them, as described in
256 <a href="#installing">Installing the ADT Plugin</a>.
257 </p></li>
258 <li>In the Update Details dialog, click <strong>Next</strong>.</li>
259 <li>Read and accept the license agreement and then click <strong>Finish</strong>.
260 This will download and install the latest version of Android DDMS and
261 Android Development Tools.</li>
262 <li>Restart Eclipse.</li>
263</ol>
264</td>
265</tr>
266</table>
267
268
269<p>If you encounter problems during the update of ADT, you
270can try removing the existing ADT plugin and then performing a fresh
Dirk Dougherty22558d02009-12-10 16:25:06 -0800271installation. To remove the plugin, follow the instructions in <a
272href="#uninstalling">Uninstalling the ADT Plugin</a>, below. To reinstall
273the plugin, follow the instructions in <a
274href="#installing">Installing the ADT Plugin</a>, above.</p>
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700275
Dirk Doughertyee58d1b2009-10-16 15:25:15 -0700276
277<h2 id="uninstalling">Uninstalling the ADT plugin</h2>
278
279<p><p>If you encounter problems when installing or updating ADT, you
280can try removing the existing ADT plugin and then performing a fresh
281installation. To remove ADT, follow these steps: </p>
282
283<table style="font-size:100%">
284<tr><th>Eclipse 3.4 (Ganymede)</th><th>Eclipse 3.5 (Galileo)</th></tr>
285<tr>
286<td width="50%">
287<!-- 3.4 steps -->
288<ol>
289 <li>Select <strong>Help</strong> &gt; <strong>Software Updates</strong> &gt;
290 <strong>Manage Configuration</strong>. </li>
291 <li>Expand the list in the left panel to reveal the installed tools.</li>
292 <li>Right-click "Android Editors" and click <strong>Uninstall</strong>. Click <strong>OK</strong>
293 to confirm.</li>
294 <li>Restart Eclipse.
295 <p>(Do not uninstall "Android Development Tools".)</p></li>
296</ol>
297</td>
298<td>
299<!-- 3.5 steps -->
300<ol>
301 <li>Select <strong>Help</strong> &gt; <strong>Install New Software</strong>.</li>
302 <li>In the "Details" panel, click the "What is already installed?" link.</li>
303 <li>In the <strong>Eclipse Installation Details</strong> dialog, select "Android DDMS" and "Android Development Tools" and then click <strong>Uninstall</strong>.</li>
304 <li>In the next window, confirm that the ADT features are selected for uninstall and then click <strong>Finish</strong> to uninstall.</li>
305 <li>Restart Eclipse.</li>
306</ol>
307</td>
308</tr>
309</table>
310