How To Adding SDK Components

Posted by BBCyber on Friday, October 15, 2010



This time I will discuss how do I add and update the components in your Android SDK to quickly and easily. To add or update the SDK discussion of individual components that you need only use the Android SDK and AVD Manager (included in the SDK Tools).

It only takes a few steps to install the individual version of the Android platform, new development tools, the new document, and the SDK add-ons. The new SDK component is automatically installed into an existing directory the SDK, so you do not need to update your development environment to determine the location of the new SDK.

If you're preparing your Android SDK for the first time, see Installing the SDK for information about what components to install.

Note: If you are developing in Eclipse, you may also need to update the ADT plugin you when you update your development tool. See the revisions contained in the ADT Plugin for Eclipse document.

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

How To Adding SDK Components

You can launch the Android SDK and AVD Manager at one of the following ways.

The launch of the Eclipse / ADT
If you are developing in Eclipse and have installed the ADT plugin, follow these steps to access the Android SDK and tools AVD Manager:
- open Eclipse
- Select Window> Android SDK and AVD Manager.

The launch of the SDK Manager script (Windows only)
For Windows only, SDK includes a script that calls the Android SDK and AVD Manager. To run the tool using the script, double click on the root directory of the SDK Manager.exe SDK.

Launched from the command line
In all the development environment, follow these steps to access the Android SDK and tools AVD Manager from command line:


- Navigate to the /tools/ directory.

- Execute the android tool command with no options.

$ android


Before you install SDK components, we recommend that you disable any antivirus software that may be running on your computer. There are cases in which antivirus software on Windows is known to interfere with the installation process, so we suggest you disable your antivirus until installation is complete.Follow these steps to install new SDK components in your environment:

Launch the Android SDK and AVD Manager as described in the section above.
Select Available Packages in the left panel. This will reveal all of the components that are currently available for download from the SDK repository.
Select the component(s) you'd like to install and click Install Selected. (If you aren't sure which packages to select, read Recommended Components.)
Verify and accept the components you want (ensure each one is selected with a green checkmark) and click Install. The components will now be installed into your existing Android SDK directories.
New platforms are automatically saved into the /platforms/ directory of your SDK; new add-ons are saved in the /add-ons/ directory; samples are saved in the /samples/android-/; and new documentation is saved in the existing /docs/ directory (old docs are replaced).


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:

You can watch for updates listed in the "SDK" tab of the Android Developers site, in the "Downloadable SDK Components" section.
You can watch for updates listed in the Available Packages panel of the Android SDK and AVD Manager.
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.

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 should also upgrade to the required version of ADT (if you are developing in Eclipse). In this case, the major version number for your ADT plugin should always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).

Also make sure that, each time you install a new version of the Android platform, you have the latest version of the SDK Platform-tools component. The SDK Platform-tools contain tools that are backward compatible with all versions of the Android platform and are often updated to support new features in the latest version of the Android platform.

The development tools will notify you with debug warnings if there is dependency that you need to address. The SDK and AVD Manager also enforces dependencies by requiring that you download any components that are needed by those you have selected.

Available Packages displays components available from the Android Repository and Third party Add-ons. 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 it's not already available under Third party Add-ons.

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:

Select Available Packages in the left panel.
Click Add Add-on Site and enter the URL of the repository.xml file. Click OK.
Any SDK components available from the site will now be listed under a new item named User Add-ons.

If you are using the SDK and AVD Manager to download components and are encountering connection problems, try connecting over http, rather than https. To switch the protocol used by the SDK and AVD Manager, follow these steps:

With the Android SDK and AVD Manager window open, select "Settings" in the left pane.
On the right, in the "Misc" section, check the checkbox labeled "Force https://... sources to be fetched using http://..."
Click Save & Apply.

{ 0 comments... read them below or add one }

Post a Comment