Installing the ADT Plugin for Android 15 Development

The examples throughout the book have used Eclipse 3.4 (Ganymede), and you'll want to ensure that you use this version when developing for Android 1.5. If you have installed an older version of the ADT plug-in (0.8 or lower), you'll need to uninstall that prior to installing the new ADT plug-in. To do that, launch the Eclipse IDE, select the Help menu item, and then choose the Software Updates... option. In the "Software Updates and Add-ons" window, select the "Installed Software" tab. To remove the previous version of ADT, you'll need to uninstall Android Development Tools and Android Editors. Uninstalling is easy: select an item from the list and click the Uninstall button. The IDE will run a process in the background and then ask you to confirm that you want to uninstall the selected item (see Figure 12-1).

Figure 12-1. The "Uninstall" window in Eclipse

Click the Finish button to have the IDE remove the selected feature. After uninstalling an item, Eclipse will display a window recommending that you restart the IDE (see Figure 12-2). But in this case, don't restart Eclipse until you have uninstalled both the Android Development Tools and the Android Editors.

Figure 12-2. After you uninstall a feature, you are prompted to restart the system.

Now you are ready to install the new ADT features. You can install ADT by pointing Eclipse to the download site, as you did in Chapter 2, or you can download the ADT archive to your local workstation and then point Eclipse to the archive. Let's do the latter. Download version 0.9.1 of the ADT plug-in from http://developer.android.com/sdk/adt_download.html. Store the .zip file at c:\ADTPluginFor1.5.

To install it, launch Eclipse, go to Help > Software Updates..., and then select the "Available Software" tab. In the "Available Software" tab, click the Add Site button and then the Archive button. Eclipse will display the "Repository archive" window, from which you'll need to select the ADT archive (which you downloaded to c:\ADTPluginFor1.5). After you select the .zip file, you'll be taken back to the "Add Site" window. Click OK. Eclipse will now load a new entry in the "Available Software" tab showing the new ADT version in the list of available software. Select the new ADT .jar file from the list, and make sure the items below the .jar file are also selected (see Figure 12-3). Then click the Install button.

Software Updates and Add-ons

Installed Software Available Software type filter t

Installed Software Available Software type filter t

Name

Version

El □ EPP Usage Data Collector Update Site

© □ Ganymede Update Site

© Q https://dl-ssl.google.com/android/edipse/

O jar: f ile: C: \ADTPIuginFor 1. 5\ADT-0.9.1. zip I /

El 0 UDU Developer Tools

0 <&■ Android DDMS

0.9.1.V200905011822-1621

[^1 =:> Android Development Tools

0.9.1.V200905011822-1621

El □ Mylyn for Eclipse 3.4

El □ The Eclipse Project Updates

ffl □ '"fl Web Tools (WTP) Update Site

Manage Sites..

0 Show only the latest versions of available software 0 Include items that have already been installed

Properties

Manage Sites..

0 Show only the latest versions of available software 0 Include items that have already been installed

Figure 12-3. Adding the new ADT plug-in to the list ofavailable add-ons

Figure 12-3. Adding the new ADT plug-in to the list ofavailable add-ons

Eclipse will then begin downloading the features from the Web, and after a minute or so, you'll be presented with a window to confirm that you want to install the features. Click the Next button to confirm and then accept the terms and license agreements that follow. Click the Finish button to have Eclipse install the new features. The install will take a minute, and then you'll be asked to restart the system. Click the Yes button when prompted to restart.

Before you can begin building applications with the Android 1.5 SDK, you'll need to point Eclipse to the path of the new SDK. Select Window > Preferences > Android. In the Android preferences window, set the SDK location path to c:\Android1.5_SDK and then click OK.

0 0

Post a comment