In the previous article Introduction to android you have seen basics of android and its architecture. In this article let use see how to setup ADT(Android Development Tool) in eclipse.
1.Download SDK
If you downloaded the Windows installer (.exe file), run it now and it will check whether the proper Java SE Development Kit (JDK) is installed (installing it, if necessary), then install the SDK Tools into a default location (which you can modify).
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 "ADT Plugin" for the Name and the following URL for the Location:
1.Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
2.Select Android from the left panel.
3.For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
4.Click Apply, then OK.
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
1.Download SDK
First you need to download android SDK from here. The SDK includes only the core SDK Tools, which you can use to download the rest of the SDK components.
If you downloaded a .zip or .tgz package (instead of the SDK installer), unpack it to a safe location on your machine. By default, the SDK files are unpacked into a directory named android-sdk-<machine-platform>.
If you downloaded a .zip or .tgz package (instead of the SDK installer), unpack it to a safe location on your machine. By default, the SDK files are unpacked into a directory named android-sdk-<machine-platform>.
If you downloaded the Windows installer (.exe file), run it now and it will check whether the proper Java SE Development Kit (JDK) is installed (installing it, if necessary), then install the SDK Tools into a default location (which you can modify).
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.
2.Installing the ADT Plugin for Eclipse
Follow these steps to download the ADT plugin and install it in your Eclipse environment.
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 "ADT Plugin" for the Name and the following URL for the Location:
4.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).
5.In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
6.In the next window, you'll see a list of the tools to be downloaded. Click Next.
7.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.
Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
8.When the installation completes, restart Eclipse.
3.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 (Mac OS X: Eclipse > Preferences).
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.
That's it!
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.
The SDK uses a modular structure that separates the major parts of the SDK—Android platform versions, add-ons, tools, samples, and documentation—into a set of separately installable components.
The SDK starter package, which you've already downloaded, includes only a single component: the latest version of the SDK Tools. To develop an Android application, you also need to download at least one Android platform and the associated platform tools. You can add other components and platforms as well, which is highly recommended.
If you used the Windows installer, when you complete the installation wizard, it will launch the Android SDK and AVD Manager with a default set of platforms and other components selected for you to install. Simply click Install to accept the recommended set of components and install them.
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.
- On Mac or Linux, open a terminal and navigate to the
tools/
directory in the Android SDK, then execute:android