Android offers a custom plugin for the Eclipse IDE, called Android
Development Tools (ADT), that is designed to give you a powerful,
integrated environment in which to build Android applications.
ADT extends the capabilites of Eclipse to let you quickly set up new Android
projects, create an application UI, add components based on the Android
Framework API, debug your applications using the Android SDK tools, and even
export signed (or unsigned) APKs in order to distribute your application.
In general, using Eclipse with ADT is a highly recommended approach to
Android development and is the fastest way to get started. If you use Eclipse,
the ADT plugin gives you an incredible boost in developing Android
applications.
To install and update the ADT Plugin, you can take advantage of the Eclipse
remote update feature. By setting up a remote update site, you can easily
download, install, and check for ADT updates. Alternatively, you can download
the latest ADT to your development computer as a local site archive. The
sections below provide instructions for both methods.
Prepare for Installation
Before you begin, take a moment to confirm that your development machine
meets the System Requirements.
If you will be developing in Eclipse with the Android Development
Tools (ADT) Plugin — the recommended path if you are new to
Android — make sure that you have a suitable version of Eclipse
installed on your computer (3.4 or newer is recommended). If you need
to install Eclipse, you can download it from this location:
http://www.eclipse.org/downloads/
A Java or RCP version of Eclipse is recommended.
Installing the ADT Plugin
Once you have the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to
download the ADT plugin and install it in your respective Eclipse environment.
Eclipse 3.4 (Ganymede) | Eclipse 3.5 (Galileo) |
- Start Eclipse, then select Help > Software Updates....
In the dialog that appears, click the Available Software tab.
- Click Add Site...
- In the Add Site dialog that appears, enter this URL in the "Location" field:
https://dl-ssl.google.com/android/eclipse/
Note: If you have trouble aqcuiring the plugin, try using "http" in the Location URL,
instead of "https" (https is preferred for security reasons).
Click OK.
- Back in the Available Software view, you should see the plugin listed by the URL,
with "Developer Tools" nested within it. Select the checkbox next to
Developer Tools and click Install...
- On the subsequent Install window, "Android DDMS" and "Android Development Tools"
should both be checked. Click Next.
- Read and accept the license agreement, then click Finish.
- Restart Eclipse.
|
- Start Eclipse, then select Help > Install
New Softare.
- In the Available Software dialog, click Add....
- In the Add Site dialog that appears, enter a name for the remote site
(for example, "Android Plugin") in the "Name" field.
In the "Location" field, enter this URL:
https://dl-ssl.google.com/android/eclipse/
Note: If you have trouble aqcuiring the plugin, you can try
using "http" in the URL, instead of "https" (https is preferred for
security reasons).
Click OK.
- Back in the Available Software view, you should now see "Developer
Tools" added to the list. Select the checkbox next to Developer Tools,
which will automatically select the nested tools Android DDMS and Android
Development Tools.
Click Next.
- In the resulting Install Details dialog, the Android DDMS and Android
Development Tools features are listed. Click Next to
read and accept the license agreement and install any dependencies,
then click Finish.
- Restart Eclipse.
|
Now modify your Eclipse preferences to point to the Android SDK directory:
- Select Window > Preferences... to open the Preferences
panel (Mac OS X: Eclipse > Preferences).
- Select Android from the left panel.
- For the SDK Location in the main panel, click Browse... and
locate your downloaded SDK directory.
- Click Apply, then OK.
Done! If you haven't encountered any problems, then you're ready to
begin developing Android applications.
Troubleshooting ADT Installation
If you are having trouble downloading the ADT plugin after following the
steps above, here are some suggestions:
If you are still unable to use Eclipse to download the ADT plugin as a
remote update site, you can download the ADT zip file to your local machine and
manually install it:
- Download the current ADT Plugin zip file from the table below (do not unpack it).
Name |
Package |
Size |
MD5 Checksum |
ADT 0.9.5 |
ADT-0.9.5.zip
|
3372982 bytes |
227ec538359fbe417ccde7f0ad614a96 |
- Follow steps 1 and 2 in the default install
instructions (above).
- In the Add Site dialog, click Archive.
- Browse and select the downloaded zip file.
- In Eclipse 3.5 only, enter a name for the local update site (e.g.,
"Android Plugin") in the "Name" field.
- Click OK.
- Follow the remaining procedures as listed for
default installation above,
starting from step 4.
To update your plugin once you've installed using the zip file, you will have
to follow these steps again instead of the default update instructions.
Other install errors
Note that there are features of ADT that require some optional
Eclipse components (for example, WST). If you encounter an error when
installing ADT, your Eclipse installion might not include these components.
For information about how to quickly add the necessary components to your
Eclipse installation, see the troubleshooting topic
ADT
Installation Error: "requires plug-in org.eclipse.wst.sse.ui".
For Linux users
If you encounter this error when installing the ADT Plugin for Eclipse:
An error occurred during provisioning.
Cannot connect to keystore.
JKS
...then your development machine lacks a suitable Java VM. Installing Sun
Java 6 will resolve this issue and you can then reinstall the ADT
Plugin.
Updating Your Eclipse ADT Plugin
From time to time, a new version of the ADT Plugin becomes available. Follow
the steps below to check whether an update is available and, if so, to install it.
For
information about new features in ADT, see the ADT Plugin Notes document.
Eclipse 3.4 (Ganymede) | Eclipse 3.5 (Galileo) |
- Select Help > Software Updates.
- Select the Available Software tab.
- Select the checkboxes next to Android DDMS and Android Developer Tools,
then click Update.
- In the resulting Available Updates dialog, ensure that both Android DDMS
and Android Development Tools are selected, then click
Next.
- Read and accept the license agreement and then click Finish.
This will download and install the latest version of Android DDMS and
Android Development Tools.
- Restart Eclipse.
|
- Select Help > Check for Updates.
- In the resulting Available Updates dialog, locate the Android DDMS and
Android Development Tools features in the list and ensure that the checkboxes
next to them are selected. Click Next.
If the Available Updates dialog does not list Android DDMS and Android
Development tools, make sure that you have set up a remote update site
for them, as described in
Installing the ADT Plugin.
- In the Update Details dialog, click Next.
- Read and accept the license agreement and then click Finish.
This will download and install the latest version of Android DDMS and
Android Development Tools.
- Restart Eclipse.
|
If you encounter problems during the update of ADT, you
can try removing the existing ADT plugin and then performing a fresh
installation. To remove the plugin, follow the instructions in Uninstalling the ADT Plugin, below. To reinstall
the plugin, follow the instructions in Installing the ADT Plugin, above.
Uninstalling the ADT plugin
If you encounter problems when installing or updating ADT, you
can try removing the existing ADT plugin and then performing a fresh
installation. To remove ADT, follow these steps:
Eclipse 3.4 (Ganymede) | Eclipse 3.5 (Galileo) |
- Select Help > Software Updates >
Manage Configuration.
- Expand the list in the left panel to reveal the installed tools.
- Right-click "Android Editors" and click Uninstall. Click OK
to confirm.
- Restart Eclipse.
(Do not uninstall "Android Development Tools".)
|
- Select Help > Install New Software.
- In the "Details" panel, click the "What is already installed?" link.
- In the Eclipse Installation Details dialog, select "Android DDMS" and "Android Development Tools" and then click Uninstall.
- In the next window, confirm that the ADT features are selected for uninstall and then click Finish to uninstall.
- Restart Eclipse.
|