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