ADT Plugin for Eclipse

Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.

ADT extends the capabilities 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.

Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug ouput pane, ADT gives you an incredible boost in developing Android applications.

This document provides step-by-step instructions on how to download the ADT plugin and install it into your Eclipse development environment. Note that before you can install or use ADT, you must have compatible versions of both the Eclipse IDE and the Android SDK installed. For details, make sure to read Installing the ADT Plugin, below.

If you are already using ADT, this document also provides instructions on how to update ADT to the latest version or how to uninstall it, if necessary.

Revisions

The sections below provide notes about successive releases of the ADT Plugin, as denoted by revision number.

ADT 0.9.6 (March 2010)

Dependencies:

ADT 0.9.6 is designed for use with SDK Tools r5 and later. Before updating to ADT 0.9.6, we highly recommend that you use the Android SDK and AVD Manager to install SDK Tools r5 into your SDK.

General Notes:

  • Editing default.properties outside of Eclipse will now automatically update the project.
  • Loads the SDK content only when a project requires it. This will make Eclipse use less resources when the SDK contains many versions of Android.
  • Resolves potential deadlock between modal dialogs, when launching ADT the first time with the SDK Usage panel.
  • Fixes issues with the New Project Wizard when selecting samples.
AVD/SDK Manager:

  • Adds support for platform samples components.
  • Improves support for dependency between components.
  • AVDs now sorted by API level.
  • The AVD creation dialog now enforces a minimum SD card size of 9MB.
  • Prevents deletion of running AVDs.
DDMS:

  • DDMS plug-in now contains the Allocation Tracker view.
  • New action in the Logcat view: "Go to problem" lets you go directly from an exception trace output to the code.
Editors:

  • Explode mode in the Visual Layout Editor adds a margin to all layout objects so that it’s easier to see embedded or empty layouts.
  • Outline mode in the Visual Layout Editor draws layout outline to make it easier to see layout objects.
  • Several fixes in the configuration selector of the Visual Layout Editor.
Application launching:

  • Applications launched from ADT now behave as if they were clicked from the Home screen.
  • Fixes issue where add-on with no optional library would not show up as valid targets for application launches.
  • Resolves possible crash when launching applications.

ADT 0.9.5 (December 2009)

Dependencies:

ADT 0.9.5 requires features provided in SDK Tools r4 or higher. If you install ADT 0.9.5, which is highly recommended, you should use the Android SDK and AVD Manager to download thye latest SDK Tools into your SDK. For more information, see Adding SDK Components.

General Notes:

  • AVD Launch dialog now shows scale value.
  • Fixes potential NPE in SDK Manager on AVD launch, for older AVD with no skin name specified.
  • Fixes XML validation issue in on older Java versions.
  • .apk packaging now properly ignores vi swap files as well as hidden files.

ADT 0.9.4 (October 2009)

Dependencies:

ADT 0.9.4 requires features provided in SDK Tools r3 or higher. If you install ADT 0.9.4, which is highly recommended, you should use the Android SDK and AVD Manager to download the latest SDK Tools into your SDK. For more information, see Adding SDK Components.

Project Creation Wizard:

  • New option to create a project from a sample by choosing it from a list.
Layout Editor:

  • Improved Configuration selector that lets you see how your layout will render on different devices. Default device descriptions include ADP1 and Google Ion, while SDK add-ons can also provide new descriptions. A new UI allows you to create custom descriptions.
  • Adds a new clipping toggle, to let you see your full layout even if it’s bigger than the screen.
DDMS Integration:

  • Includes the improvements from the standlone DDMS, revision 3.
  • Adds an option to open HPROF files into eclipse instead of writing them on disk. If a profiler such as MAT (Memory Analyzer Tool) is installed, it’ll open the file.
Android SDK and AVD Manager integration:

  • Includes the improvements from the standalone Android SDK and AVD Manager, revision 3.

Installing the ADT Plugin

The sections below provide instructions on how to download and install ADT into your Eclipse environment. If you encounter problems, see the Troubleshooting section.

Preparing Your Development Computer

ADT is a plugin for the Eclipse IDE. Before you can install or use ADT, you must have a compatible version of Eclipse installed on your development computer.

  • If Eclipse is already installed on your computer, make sure that it is a version that is compatible with ADT and the Android SDK. Check the System Requirements document for a list of Eclipse versions that are compatible with the Android SDK.
  • If you need to install or update Eclipse, you can download it from this location:

    http://www.eclipse.org/downloads/

    A Java or RCP version of Eclipse is recommended.

Additionally, before you can configure or use ADT, you must install the Android SDK starter package, as described in Downloading the SDK Starter Pacskage. Specifically, you need to install a compatible version of the Android SDK Tools and at least one development platform. To simplify ADT setup, we recommend installing the Android SDK prior to installing ADT.

When your Eclipse and Android SDK environments are ready, continue with the ADT installation as described in the steps below.

Downloading the ADT Plugin

Use Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.

Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.

Eclipse 3.4 (Ganymede) Eclipse 3.5 (Galileo)
  1. Start Eclipse, then select Help > Software Updates…. In the dialog that appears, click the Available Software tab.
  2. Click Add Site…
  3. 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 acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
    Click OK.

  4. 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…
  5. On the subsequent Install window, "Android DDMS" and "Android Development Tools" should both be checked. Click Next.
  6. Read and accept the license agreement, then click Finish.
  7. Restart Eclipse.
  1. Start Eclipse, then select Help > Install New Software.
  2. In the Available Software dialog, click Add….
  3. 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 acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).
    Click OK.

  4. 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.

  1. 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.
  2. Restart Eclipse.

 

Configuring the ADT Plugin

Once you’ve successfully downnloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  1. Select Window > Preferences… to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.
  4. Click Apply, then OK.

Done! If you haven’t encountered any problems, then the installation is complete. Now read Adding Platforms and Other Components for instructions on how to complete the setup of your SDK environment.

Troubleshooting ADT Installation

If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:

  • If Eclipse can not find the remote update site containing the ADT plugin, try changing the remote site URL to use http, rather than https. That is, set the Location for the remote site to:
    http://dl-ssl.google.com/android/eclipse/
  • If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.

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:

  1. Download the current ADT Plugin zip file from the table below (do not unpack it).
  2. Name Package Size MD5 Checksum
    ADT 0.9.6 ADT-0.9.6.zip 7456339 bytes ea45d271be52b87b5dd1c9fb17536223
  3. Follow steps 1 and 2 in the default install instructions (above).
  4. In the Add Site dialog, click Archive.
  5. Browse and select the downloaded zip file.
  6. In Eclipse 3.5 only, enter a name for the local update site (e.g., "Android Plugin") in the "Name" field.
  7. Click OK.
  8. 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 the ADT Plugin

From time to time, a new revision of the ADT Plugin becomes available, with new features and bug fixes. Generally, when a new revision of ADT is available, you should update to it as soon as convenient.

In some cases, a new revision of ADT will have a dependency on a specific revision of the Android SDK Tools. If such dependencies exist, you will need to update the SDK Tools component of the SDK after installing the new revision of ADT. To update the SDK Tools component, use the Android SDK and AVD Manager, as described in Adding SDK Components.

To learn about new features of each ADT revision and also any dependencies on the SDK Tools, see the listings in the Revisions section. To determine the version currently installed, open the Eclipse Installed Software window using Help > Software Updates and refer to the version listed for "Android Development Tools".

Follow the steps below to check whether an update is available and, if so, to install it.

Eclipse 3.4 (Ganymede) Eclipse 3.5 (Galileo)
  1. Select Help > Software Updates.
  2. Select the Available Software tab.
  3. Select the checkboxes next to Android DDMS and Android Developer Tools, then click Update.
  4. In the resulting Available Updates dialog, ensure that both Android DDMS and Android Development Tools are selected, then click Next.
  5. 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.
  6. Restart Eclipse.
  1. Select Help > Check for Updates.
  2. 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.
  3. 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.
  4. In the Update Details dialog, click Next.
  5. 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.
  6. 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)
  1. Select Help > Software Updates > Manage Configuration.
  2. Expand the list in the left panel to reveal the installed tools.
  3. Right-click "Android Editors" and click Uninstall. Click OK to confirm.
  4. Restart Eclipse.

    (Do not uninstall "Android Development Tools".)

  1. Select Help > Install New Software.
  2. In the "Details" panel, click the "What is already installed?" link.
  3. In the Eclipse Installation Details dialog, select "Android DDMS" and "Android Development Tools" and then click Uninstall.
  4. In the next window, confirm that the ADT features are selected for uninstall and then click Finish to uninstall.
  5. Restart Eclipse.

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: