Set up the Android SDK

yuzhangqi發表於2011-10-10

This blog will show you how to set up the Android SDK on Windows 7 / Vista.

Overview

Here's an overview of the steps you must follow to set up the Android SDK:

  1. Prepare your development computer and ensure it meets the system requirements.
  2. Download and install the SDK starter package. (If you're on Windows, download the installer for help with the initial setup.)
  3. Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).
  4. Add Android platforms and other components to your SDK.
  5. Explore the contents of the Android SDK (optional).

Installing the SDK

Step 1. Preparing Your Development Computer

refer to the link http://developer.android.com/sdk/requirements.html for the system and software requirements for developing Android applications using the Android SDK.

Step 2. Downloading the SDK Starter Package

The SDK starter package is not a full development environment—it includes only the core SDK Tools, which you can use to download the rest of the SDK components (such as the latest Android platform).

If you haven't already, get the latest version of the SDK starter package from the link .

While finishing the installation,make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later, when setting up the ADT plugin and when using the SDK tools from the command line.

Step 3. Installing the ADT Plugin for Eclipse

Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilites of Eclipse to let you quickly set up new Android projects, create an application UI, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application. In general, developing in Eclipse with ADT is a highly recommended approach and is the fastest way to get started with Android.

Follow the steps below to download the ADT plugin and install it in your Eclipse environment.Resources.

  1. Start Eclipse, then select Help > Install New Software....
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter "The Eclipse Project Updates" for the Name and the following URL for the Location:
  4. Click OK
  5. Click "Select All" button,then Click "Next" button to finish the eclipse update process.
  6. Redo as step1 to 4, 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/
  7. 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).

  8. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  9. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  10. 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.

  11. When the installation completes, restart Eclipse.

Configuring the ADT Plugin

After you've successfully downloaded the 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 .
  2. 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. You cannot continue with this procedure until you click Proceed.

  3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
  4. Click Apply, then OK.

Step 4. Adding Platforms and Other Components

The last step in setting up your SDK is using the Android SDK and AVD Manager (a tool included in the SDK starter package) to download essential SDK components into your development environment.

You can launch the Android SDK and AVD Manager in one of the following ways:

  • From within Eclipse, select Window > Android SDK and AVD Manager.
  • On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.

To download components, use the graphical UI of the Android SDK and AVD Manager to browse the SDK repository and select new or updated components. The Android SDK and AVD Manager installs the selected components in your SDK environment.

Resources

Eclipse IDE

Android SDK http://developer.android.com/sdk/installing.html

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13651903/viewspace-1055545/,如需轉載,請註明出處,否則將追究法律責任。

相關文章