From 7b229effcced9ad5aaa3d2ea6b4b219239348481 Mon Sep 17 00:00:00 2001 From: Dirk Dougherty Date: Fri, 26 Mar 2010 17:32:26 -0700 Subject: cherry-pick af4786bcb5945f72e8639d74611cd5f9b0236710 to froyo Conflicts: docs/html/sdk/installing.jd Change-Id: Id43ad8c62039099bb518722bb8694dcf8ba6dfa6 --- docs/html/sdk/adding-components.jd | 203 ++++++++++++++++++++++++------------- 1 file changed, 135 insertions(+), 68 deletions(-) (limited to 'docs/html/sdk/adding-components.jd') diff --git a/docs/html/sdk/adding-components.jd b/docs/html/sdk/adding-components.jd index d7c886e..90e9045 100644 --- a/docs/html/sdk/adding-components.jd +++ b/docs/html/sdk/adding-components.jd @@ -7,22 +7,17 @@ page.title=Adding SDK Components

Quickview

In this document

    +
  1. Launching the Android SDK and AVD Manager
  2. Installing SDK Components -
      -
    1. Adding New Sites
    2. -
    -
  3. +
  4. Updating SDK Components
  5. Component Dependencies
  6. +
  7. Adding New Sites
  8. +
  9. Troubleshooting
@@ -30,58 +25,102 @@ page.title=Adding SDK Components

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.

+and AVD Manager tool is included in the Android SDK +download.

+ +

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 are just getting started and you are not sure what components to install, +see Adding Platforms and Other +Components for information.

-

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.

+

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

+ +
+ +

Figure 1. The Android SDK and AVD Manager's +Available Packages +panel, which shows the SDK components that are +available for you to download into your environment.

+
+ +

Launching the Android SDK and AVD Manager

+ +

The Android SDK and AVD Manager is the tool that you use to install and +upgrade SDK components in your development environment.

+ +

You can access the tool in any of three ways:

+ -

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.

+

Launching from Eclipse/ADT

-

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.

+

If you are developing in Eclipse and have already installed the ADT Plugin, +follow these steps to access the Android SDK and AVD Manager tool:

+ +
    +
  1. Open Eclipse
  2. +
  3. Select Window > Android SDK and AVD +Manager.
  4. +
+

Launching from the setup script (Windows only)

-

Installing SDK Components

+

For Windows only, the SDK includes a script that invokes the Android SDK and +AVD Manager. To launch the tool using the script, double-click "SDK +Setup.exe" at the root of the the SDK directory.

+ +

Launching from a command line

-

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

+

In all development environments, follow these steps to access the Android SDK +and AVD Manager tool from the command line:

+ +
    +
  1. Navigate to the <sdk>/tools/ directory.
  2. +
  3. Execute the {@code android} tool command with no options. +
    $ android
  4. +
+ + +

Installing 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:

- - - +

Follow these steps to install new SDK components in your environment:

-

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. -
  3. Select the components you'd like to install and click Install - Selected.
  4. +
  5. Launch the Android SDK and AVD Manager as described in the section above.
  6. +
  7. Select Available Packages in the left panel. + This will reveal all of the components that are currently available for download + from the SDK repository.
  8. +
  9. Select the component(s) you'd like to install and click Install + Selected. If you aren't sure which packages to select, read Which components do I need?.
  10. Verify and accept the components you want and click Install Accepted. The components will now be installed into your existing Android SDK directories.
  11. @@ -93,14 +132,56 @@ 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).

    + +

    Updating SDK Components

    + +

    From time to time, new revisions of existing SDK components are released and +made available to you through the SDK repository. In most cases, if you have those +components installed in your environment, you will want +to download the new revisions as soon as possible.

    + +

    You can learn about the release of new revisions in two ways:

    + + + +

    When you see that a new revision is available, you can use the Android SDK +and AVD Manager to quickly download it to your environment. Follow the same +procedure as given in Installing SDK Components, above. The new +component is installed in place of the old, but without impacting your +applications.

    +

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

    -

    Adding New Sites

    +

    SDK Component Dependencies

    + +

    In some cases, an SDK component may require a specific minimum revision of +another component or SDK tool. Where such dependencies exist, they are +documented in the revision notes for each component, available from the links in +the "Downloadable SDK Components" section at left.

    + +

    For example, there may be a dependency between the ADT Plugin for Eclipse and +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 +"Revisions" section of 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.

    + + +

    Adding New Sites

    -

    By default, Available Components only shows the default +

    By default, Available Packages 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 @@ -115,14 +196,14 @@ 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. +
    3. Select Available Packages in the left panel.
    4. Click Add Site and enter the URL of the {@code repository.xml} file. Click OK.

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

    +Available Packages.

    -

    Troubleshooting

    +

    Troubleshooting

    Problems connecting to the SDK repository

    @@ -138,18 +219,4 @@ protocol used by the SDK and AVD Manager, follow these steps:

  12. Click Save & Apply.
-

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.

-- cgit v1.1