Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

Installing the Android Plug-in for Eclipse 391

The Windows version is available as an installation wizard that walks you
through the process of setting it up. The others, at the time of this writing,
are a ZIParchive (Mac OS) or a TGZ archive (Linux).


Either with the installation wizard or a program that handles archives, put
Android in a folder where you store programs—presumably the same par-
ent folder where Eclipse’s folder was placed. On my computer, I put it in
Program Files (x86).


The SDK includes an SDK and AVD Manager that will be used to update
and enhance the SDK after it has been installed.


The manager, which is run from a menu command in Eclipse, makes it easy
to keep the SDK current with each new release of the Android.


After you’ve installed the SDK, you’re ready to run Eclipse for the first time.


Installing the Android Plug-in for


Eclipse


The Eclipse IDE supports numerous programming languages and technolo-
gies, but all of them are not supported right away. The IDE is enhanced with
plug-ins that provide the functionality you need.


Eclipse needs a plug-in to integrate the IDE with the Android SDK. The
plug-in adds menu commands to the IDE interface related to Android and
makes it possible to create and manage Android apps.


Follow these steps:



  1. Launch Eclipse by using the shortcut you created or opening the fold-
    er where it was installed and running the executable application. The
    program loads with several windows and a menu bar and toolbar run-
    ning across the top.

  2. Select the menu command Help, Install New Software. The Install
    Wizard opens, which enables you to find and install plug-ins for Eclipse.
    The plug-ins are downloaded from software repositories, but Eclipse
    must know the location of a repository before it can find plug-ins there.

  3. Click the Add button. The Add Repository dialog opens.

  4. Leave the Name field blank. In the Location field, enter the web
    address http://dl-ssl.google.com/android/eclipse/and click OK.
    A Developer Tools item should appear in the Install window, as
    shown in Figure D.1.

Free download pdf