OSDN Git Service

am 1b0c9c95: am 81c1d8d3: Ensure install-during-restore is like install-then-restore
[android-x86/frameworks-base.git] / docs / html / sdk / installing / installing-adt.jd
1 page.title=Installing the Eclipse Plugin
2 adt.zip.version=21.0.1
3 adt.zip.download=ADT-21.1.0.zip
4 adt.zip.bytes=13564671
5 adt.zip.checksum=f1ae183891229784bb9c33bcc9c5ef1e
6
7 @jd:body
8
9
10
11 <p>Android offers a custom plugin for the Eclipse IDE, called Android
12 Development Tools (ADT). This plugin provides a powerful, integrated
13 environment in which to develop Android apps. It extends the capabilities
14 of Eclipse to let you quickly set up new Android projects, build an app
15 UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
16 </p>
17
18 <p>If you need to install Eclipse, you can download it from <a href=
19 "http://eclipse.org/mobile/">eclipse.org/mobile</a>.</p>
20
21
22 <p class="note"><strong>Note:</strong> If you prefer to work in a different IDE, you do not need to
23 install Eclipse or ADT. Instead, you can directly use the SDK tools to build and
24 debug your application.</p>
25
26
27
28 <h2 id="Download">Download the ADT Plugin</h2>
29
30
31 <ol>
32     <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
33 Software</strong>.</li>
34     <li>Click <strong>Add</strong>, in the top-right corner.</li>
35     <li>In the Add Repository dialog that appears, enter "ADT Plugin" for the <em>Name</em> and the
36 following URL for the <em>Location</em>:
37       <pre>https://dl-ssl.google.com/android/eclipse/</pre>
38     </li>
39     <li>Click <strong>OK</strong>.
40       <p>If you have trouble acquiring the plugin, try using "http" in the Location URL,
41 instead of "https" (https is preferred for security reasons).</p></li>
42     <li>In the Available Software dialog, select the checkbox next to Developer Tools and click
43 <strong>Next</strong>.</li>
44     <li>In the next window, you'll see a list of the tools to be downloaded. Click
45 <strong>Next</strong>. </li>
46     <li>Read and accept the license agreements, then click <strong>Finish</strong>.
47       <p>If you get a security warning saying that the authenticity or validity of
48 the software can't be established, click <strong>OK</strong>.</p></li>
49     <li>When the installation completes, restart Eclipse. </li>
50 </ol>
51
52
53
54
55 <h2 id="Configure">Configure the ADT Plugin</h2>
56
57 <p>Once Eclipse restarts, you
58   must specify the location of your Android SDK directory:</p>
59
60 <ol>
61     <li>In the "Welcome to Android Development" window that appears, select <strong>Use
62 existing SDKs</strong>.</li>
63     <li>Browse and select the location of the Android SDK directory you recently
64 downloaded and unpacked.</li>
65     <li>Click <strong>Next</strong>.</li>
66 </ol>
67
68 <p>Your Eclipse IDE is now set up to develop Android apps, but you need to add
69 the latest SDK platform tools and an Android platform to your environment.
70 To get these packages for your SDK, continue to
71 <a href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>
72
73
74
75
76
77
78 <h2 id="Troubleshooting">Troubleshooting Installation</h2>
79
80 <p> If you are having trouble downloading the ADT plugin after following the
81 steps above, here are some suggestions: </p>
82
83 <ul>
84   <li>If Eclipse can not find the remote update site containing the ADT plugin,
85 try changing the remote site URL to use http, rather than https. That is, set
86 the Location for the remote site to:
87 <pre>http://dl-ssl.google.com/android/eclipse/</pre></li>
88 <li>If you are behind a firewall (such as a corporate firewall), make sure that
89 you have properly configured your proxy settings in Eclipse. In Eclipse,
90 you can configure proxy information from the main Eclipse menu in
91 <strong>Window</strong> (on Mac OS X, <strong>Eclipse</strong>) &gt;
92 <strong>Preferences</strong> &gt; <strong>General</strong> &gt; <strong>Network
93 Connections</strong>.</li>
94 </ul>
95
96 <p> If you are still unable to use Eclipse to download the ADT plugin as a
97 remote update site, you can download the ADT zip file to your local machine and
98 manually install it:</p>
99
100 <ol>
101   <li>Download the ADT Plugin zip file (do not unpack it):
102
103   <table class="download">
104     <tr>
105       <th>Package</th>
106       <th>Size</th>
107       <th>MD5 Checksum</th>
108   </tr>
109   <tr>
110     <td>
111       <a href="http://dl.google.com/android/{@adtZipDownload}">{@adtZipDownload}</a>
112     </td>
113     <td>{@adtZipBytes} bytes</td>
114     <td>{@adtZipChecksum}</td>
115   </tr>
116 </table>
117 </li>
118
119 </li>
120   <li>Start Eclipse, then select <strong>Help</strong> &gt; <strong>Install New
121 Software</strong>.</li>
122   <li>Click <strong>Add</strong>, in the top-right corner.</li>
123   <li>In the Add Repository dialog, click <strong>Archive</strong>.</li>
124   <li>Select the downloaded {@adtZipDownload} file and click <strong>OK</strong>.</li>
125   <li>Enter "ADT Plugin" for the name and click <strong>OK</strong>.
126   <li>In the Available Software dialog, select the checkbox next to Developer Tools and click
127 <strong>Next</strong>.</li>
128   <li>In the next window, you'll see a list of the tools to be downloaded. Click
129 <strong>Next</strong>. </li>
130   <li>Read and accept the license agreements, then click <strong>Finish</strong>.
131     <p>If you get a security warning saying that the authenticity or validity of
132 the software can't be established, click <strong>OK</strong>.</p></li>
133   <li>When the installation completes, restart Eclipse. </li>
134 </ol>
135
136 <p>To update your plugin once you've installed using the zip file, you will have
137 to follow these steps again instead of the default update instructions.</p>
138
139 <h4>Other install errors</h4>
140
141 <p>Note that there are features of ADT that require some optional
142 Eclipse packages (for example, WST). If you encounter an error when
143 installing ADT, your Eclipse installion might not include these packages.
144 For information about how to quickly add the necessary packages to your
145 Eclipse installation, see the troubleshooting topic
146 <a href="{@docRoot}resources/faq/troubleshooting.html#installeclipsecomponents">ADT
147 Installation Error: "requires plug-in org.eclipse.wst.sse.ui"</a>.</p>
148
149 <h4>For Linux users</h4>
150 <p>If you encounter this error when installing the ADT Plugin for Eclipse:
151 <pre>
152 An error occurred during provisioning.
153 Cannot connect to keystore.
154 JKS</pre>
155 <p>
156 ...then your development machine lacks a suitable Java VM. Installing Sun
157 Java 6 will resolve this issue and you can then reinstall the ADT
158 Plugin.</p>
159