Thursday, 2 August 2012

Installing the Eclipse Plugin For Android


Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT). This plugin is designed to give you a powerful, integrated environment in which to develop Android apps. It extends the capabilites of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.

If you will be developing in Eclipse with the ADT Plugin, first make sure that you have a suitable version of Eclipse installed on your computer as described by the system requirements.

If you need to install Eclipse, you can download it from http://www.eclipse.org/downloads/. We recommend the "Eclipse Classic" version. Otherwise, you should use a Java or RCP version of Eclipse.

Note: If you prefer to work in a different IDE, you do not need to install Eclipse or ADT. Instead, you can directly use the SDK tools to build and debug your application. So if you're not using Eclipse, continue to the next page by clicking the Next link on the right.
Download the ADT Plugin

    Start Eclipse, then select Help > Install New Software....
    Click Add, in the top-right corner.
    In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:

    https://dl-ssl.google.com/android/eclipse/

    Click OK

    Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
    In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
    In the next window, you'll see a list of the tools to be downloaded. Click Next.
    Read and accept the license agreements, then click Finish.

    Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
    When the installation completes, restart Eclipse.

Configure the ADT Plugin

After you've installed ADT and restarted Eclipse, you must specify the location of your Android SDK directory:

    Select Window > Preferences... to open the Preferences panel (on Mac OS X, select Eclipse > Preferences).
    Select Android from the left panel.

    You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed.
    For the SDK Location in the main panel, click Browse... and locate your downloaded Android SDK directory (such as android-sdk-windows).
    Click Apply, then OK.

If you haven't encountered any errors, you're done setting up ADT and can continue to the next step of the SDK installation.
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 package of the SDK after installing the new revision of ADT. To update the SDK Tools package, use the Android SDK Manager, as described in Exploring the SDK.

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.

    Select Help > Check for Updates.

    If there are no updates available, a dialog will say so and you're done.
    If there are updates available, select Android DDMS, Android Development Tools, and Android Hierarchy Viewer, then click Next.
    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, remove the existing ADT plugin from Eclipse, then perform a fresh installation, using the instructions for Installing the ADT Plugin.
Troubleshooting

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/

No comments:

Post a Comment