• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Installing the Eclipse Plugin
2walkthru=1
3adt.zip.version=20.0.0
4adt.zip.download=ADT-20.0.0.zip
5adt.zip.bytes=12387628
6adt.zip.checksum=ea0fc934af3b6b89097f0146c7822ed0
7
8@jd:body
9
10
11
12<p>Android offers a custom plugin for the Eclipse IDE, called Android
13Development Tools (ADT). This plugin is designed to give you a powerful, integrated
14environment in which to develop Android apps. It extends the capabilites
15of Eclipse to let you quickly set up new Android projects, build an app
16UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
17</p>
18
19<p>If you will be developing in Eclipse with the ADT Plugin, first make sure that you have a
20suitable version of Eclipse
21installed on your computer as described by the
22<a href="{@docRoot}sdk/index.html#Requirements">system requirements</a>.</p>
23
24<p>If you need to install Eclipse, you can download it from <a href=
25"http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a>.
26We recommend the "Eclipse Classic" version. Otherwise, you should use a Java or
27RCP version of Eclipse.</p>
28
29
30<p class="note"><strong>Note:</strong> If you prefer to work in a different IDE, you do not need to
31install Eclipse or ADT. Instead, you can directly use the SDK tools to build and
32debug your application. So if you're not using Eclipse, continue to the next page by clicking
33the <strong>Next</strong> link on the right.</p>
34
35
36
37<h2 id="Download">Download the ADT Plugin</h2>
38
39
40<ol>
41    <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
42Software...</strong>.</li>
43    <li>Click <strong>Add</strong>, in the top-right corner.</li>
44    <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
45following URL for the <em>Location</em>:
46      <pre>https://dl-ssl.google.com/android/eclipse/</pre>
47    </li>
48    <li>Click <strong>OK</strong>
49      <p>Note: If you have trouble acquiring the plugin, try using "http" in the Location URL,
50instead of "https" (https is preferred for security reasons).</p></li>
51    <li>In the Available Software dialog, select the checkbox next to Developer Tools and click
52<strong>Next</strong>.</li>
53    <li>In the next window, you'll see a list of the tools to be downloaded. Click
54<strong>Next</strong>. </li>
55    <li>Read and accept the license agreements, then click <strong>Finish</strong>.
56      <p>Note: If you get a security warning saying that the authenticity or validity of
57the software can't be established, click <strong>OK</strong>.</p></li>
58    <li>When the installation completes, restart Eclipse. </li>
59</ol>
60
61
62
63
64<h2 id="Configure">Configure the ADT Plugin</h2>
65
66<p>After you've installed ADT and restarted Eclipse, you
67  must specify the location of your Android SDK directory:</p>
68
69<ol>
70    <li>Select <strong>Window</strong> &gt; <strong>Preferences...</strong> to open the Preferences
71        panel (on Mac OS X, select <strong>Eclipse</strong> &gt; <strong>Preferences</strong>).</li>
72    <li>Select <strong>Android</strong> from the left panel.</li>
73      <p>You may see a dialog asking whether you want to send usage statistics to Google. If so,
74make your choice and click <strong>Proceed</strong>.</p>
75    <li>For the <em>SDK Location</em> in the main panel, click <strong>Browse...</strong> and
76        locate your downloaded Android SDK directory (such as <code>android-sdk-windows</code>).</li>
77    <li>Click <strong>Apply</strong>, then <strong>OK</strong>.</li>
78</ol>
79
80
81<p>If you haven't encountered any errors, you're done setting up ADT
82  and can continue to the next step of the SDK installation.</p>
83
84
85
86
87<h2 id="Updating">Updating the ADT Plugin</h2>
88
89<p>From time to time, a new revision of the ADT Plugin becomes available, with
90new features and bug fixes. Generally, when a new revision of ADT is available,
91you should update to it as soon as convenient. </p>
92
93<p>In some cases, a new revision of ADT will have a dependency on a specific
94revision of the Android SDK Tools. If such dependencies exist, you will need to
95update the SDK Tools package of the SDK after installing the new revision of
96ADT. To update the SDK Tools package, use the Android SDK Manager, as
97described in <a href="{@docRoot}sdk/exploring.html">Exploring the SDK</a>.</p>
98
99<p>To learn about new features of each ADT revision and also any dependencies on
100the SDK Tools, see the listings in the <a href="#notes">Revisions</a>
101section. To determine the version currently installed, open the
102Eclipse Installed Software window using <strong>Help</strong>
103&gt; <strong>Software Updates</strong> and refer to the version listed for
104"Android Development Tools".</p>
105
106<p>Follow the steps below to check whether an update is available and, if so,
107to install it. </p>
108
109<ol>
110    <li>Select <strong>Help</strong> &gt; <strong>Check for Updates</strong>.
111      <p>If there are no updates available, a dialog will say so and you're done.</p></li>
112    <li>If there are updates available, select Android DDMS, Android Development Tools,
113      and Android Hierarchy Viewer, then click <strong>Next</strong>.</li>
114    <li>In the Update Details dialog, click <strong>Next</strong>.</li>
115    <li>Read and accept the license agreement and then click <strong>Finish</strong>.
116      This will download and install the latest version of Android DDMS and
117      Android Development Tools.</li>
118    <li>Restart Eclipse.</li>
119</ol>
120
121
122<p>If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then
123perform a fresh installation, using the instructions for <a href="#installing">Installing the ADT
124Plugin</a>.</p>
125
126
127
128<h2 id="Troubleshooting">Troubleshooting</h2>
129
130<p> If you are having trouble downloading the ADT plugin after following the
131steps above, here are some suggestions: </p>
132
133<ul>
134  <li>If Eclipse can not find the remote update site containing the ADT plugin,
135try changing the remote site URL to use http, rather than https. That is, set
136the Location for the remote site to:
137<pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
138<li>If you are behind a firewall (such as a corporate firewall), make sure that
139you have properly configured your proxy settings in Eclipse. In Eclipse,
140you can configure proxy information from the main Eclipse menu in
141<strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
142<strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
143Connections</strong>.</li>
144</ul>
145
146<p> If you are still unable to use Eclipse to download the ADT plugin as a
147remote update site, you can download the ADT zip file to your local machine and
148manually install it:</p>
149
150<ol>
151  <li>Download the current ADT Plugin zip file from the table below (do not unpack it).
152
153  <table class="download">
154    <tr>
155      <th>Name</th>
156      <th>Package</th>
157      <th>Size</th>
158      <th>MD5 Checksum</th>
159  </tr>
160  <tr>
161    <td>ADT {@adtZipVersion}</td>
162    <td>
163      <a href="http://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
164    </td>
165    <td>{@adtZipBytes} bytes</td>
166    <td>{@adtZipChecksum}</td>
167  </tr>
168</table>
169</li>
170
171</li>
172  <li>Follow steps 1 and 2 in the <a href="#installing">default install
173      instructions</a> (above).</li>
174  <li>In the Add Site dialog, click <strong>Archive</strong>.</li>
175  <li>Browse and select the downloaded zip file.</li>
176  <li>Enter a name for the local update site (e.g.,
177      "Android Plugin") in the "Name" field.</li>
178  <li>Click <strong>OK</strong>.
179  <li>Follow the remaining procedures as listed for
180      <a href="#installing">default installation</a> above,
181      starting from step 4.</li>
182</ol>
183
184<p>To update your plugin once you've installed using the zip file, you will have
185to follow these steps again instead of the default update instructions.</p>
186
187<h4>Other install errors</h4>
188
189<p>Note that there are features of ADT that require some optional
190Eclipse packages (for example, WST). If you encounter an error when
191installing ADT, your Eclipse installion might not include these packages.
192For information about how to quickly add the necessary packages to your
193Eclipse installation, see the troubleshooting topic
194<a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
195Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
196
197<h4>For Linux users</h4>
198<p>If you encounter this error when installing the ADT Plugin for Eclipse:
199<pre>
200An error occurred during provisioning.
201Cannot connect to keystore.
202JKS</pre>
203<p>
204...then your development machine lacks a suitable Java VM. Installing Sun
205Java 6 will resolve this issue and you can then reinstall the ADT
206Plugin.</p>
207