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