Adding SDK Components

Quickview

  • Use the Android SDK and AVD Manager to keep your SDK up-to-date without having to install new SDK directories.
  • The Android SDK and AVD Manager is available only with the Android 1.6 SDK or later.
  • The Eclipse ADT plugin may require an update when installing new tools or system images.

In this document

  1. Installing SDK Components
    1. Adding New Sites
  2. Component Dependencies

Adding and updating components in your Android SDK is fast and easy. To perform an update, use the Android SDK and AVD Manager to install or update the individual SDK components that you need. The Android SDK and AVD Manager tool is included in Android 1.6 and later SDK packages.

It only takes a couple of clicks to install individual versions of the Android platform, new development tools, new documentation, and SDK add-ons. The new SDK components are automatically installed into your existing SDK directory, so you don't need to update your development environment to specify a new SDK location.

Because each version of the Android platform can be installed as an individual component of your SDK, you can customize your development environment to the Android platforms you are targetting. Testing your app on multiple versions of the platform is very important in order to successfully operate on as many devices as possible. Be sure to install each version of the Android platform with which your app is compatible, then test your apps on AVDs that run each platform.

If you develop applications using Eclipse, you may also need to update your ADT plugin when you update your development tools or in order to compile against a new version of the platform. See the SDK Tools Notes document for ADT compatibility.

Installing SDK Components

Use the Android SDK and AVD Manager to install new SDK components.

Important: Before you install SDK components, we recommend that you disable any antivirus programs that may be running on your computer.

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

  • Execute the android tool command with no options. If you haven't used the tool before, change to the <sdk>/tools directory and run the command:
    $ android
  • If you have downloaded the SDK Tools (Revision 3 or higher) and are running Windows, you can double-click "SDK Setup.exe" in the SDK directory.
  • If you are developing in Eclipse with ADT, you can select Window >Android SDK and AVD Manager.

When a new platform version, add-on, set of development tools or documentation becomes available, you can quickly install them into your existing Android SDK:

  1. Select Available Components in the left panel. This will reveal all components currently available for download.
  2. Select the components you'd like to install and click Install Selected.
  3. Verify and accept the components you want and click Install Accepted. The components will now be installed into your existing Android SDK directories.

New platforms are automatically saved into the <sdk>/platforms/ directory of your SDK; new add-ons are saved in the <sdk>/add-ons/ directory; and new documentation is saved in the existing <sdk>/docs/ directory (old docs are replaced).

Tip: Use the "Display updates only" checkbox to show only the components you do not have.

Adding New Sites

By default, Available Components only shows the default repository site, which offers platforms, SDK tools, documentation, the Google APIs Add-on, and other components. You can add other sites that host their own Android SDK add-ons, then download the SDK add-ons from those sites.

For example, a mobile carrier or device manufacturer might offer additional API libraries that are supported by their own Android-powered devices. In order to develop using their libraries, you must install their Android SDK add-on.

If a carrier or device manufacturer has hosted an SDK add-on repository file on their web site, follow these steps to add their site to the SDK and AVD Manager:

  1. Select Available Components in the left panel.
  2. Click Add Site and enter the URL of the repository.xml file. Click OK.

Any SDK components available from the site will now be listed under Available Components.

SDK Component Dependencies

In some cases, a specific SDK component may require a specific minimum version of another component or SDK tool. Such dependencies are documented in the release notes for each component.

For example, there may be a dependency between the ADT plugin for Eclipse and a specific version of the SDK Tools component. When you install the SDK Tools component, you would then need to upgrade to the required version of ADT (if you are developing in Eclipse). In this case, you would find dependencies listed in the ADT Plugin Notes and SDK Tools Notes documents.

Additionally, the development tools will notify you with debug warnings if there is dependency that you need to address.

↑ Go to top