Android SDK Components

Next, invoke the SDK Setup program. On Windows, run SDK Setup.exe. On Linux and Mac OS X, run the tools/android program, select Available Packages, put a check mark next to every package, and click Install Selected.

The Setup program will now display a list of available components including documentation, platforms, add-on libraries, and USB drivers (see Figure 1.1, on the following page). Select Accept All and then click Install. All the components listed will be downloaded and installed into your SDK install directory. Note: this can take a long time to complete.

4. http://cl.android.com/sdk

Figure 1.1: Installing the Android SDK Components

To make it go faster, you can accept or reject the individual components separately instead of installing them all.

If you get an HTTPS SSL error, then cancel the window and select Settings from the main SDK and AVD Manager window. Select the option Force https:// sources to be fetched using http://, and then click Save & Apply. Exit the Setup program and start it again.

The next step is to start Eclipse and configure it. Eclipse Plug-In

To make development easier, Google has written a plug-in for Eclipse called the Android Development Toolkit (ADT). To install the plug-in, follow these steps (note these directions are for Eclipse 3.5—different versions may have slightly different menus and options):

1. Start Eclipse by running eclipse.exe on Windows or eclipse on Mac OS X or Linux. If you're prompted for a workspace directory, just accept the default and click OK.

2. Select the Help menu and then select Install New Software... (Help > Install New Software...). See the Joe Asks... on page 22 if you get a connection error.

Figure 1.2: Installing the Android Development Toolkit

3. Click the Available Software Sites link in the dialog that appears.

5. Enter the location of the Android Development Tools update site: https://dl-ssl.google.com/android/eclipse/.

Once you've filled it out, the dialog box should look like Figure 1.2.

6. Click OK to return to the Sites list, and click Test Connection to verify the site you just entered. If you have trouble with this address, try using http in the location instead of https. Once you're satisfied the address is correct, click OK again to return to the Install New Software dialog.

7. Type the word "android" in the Work With field and press Return. "Developer Tools" should now appear in the list below.

8. Select the checkbox next to Developer Tools and then click Next. If you get an error message at this point, then you may not have the right version of Eclipse. I strongly recommend using either the prebuilt Eclipse IDE for Java Developers or the Eclipse IDE for Java EE Development package, version 3.5 or newer.

If you have a custom install of Eclipse, then to use the Android editors, you will also need to install the Web Standard Tools (WST) plug-in and all its prerequisites.

0 0

Post a comment