Installing Android SDK and Eclipse ADT plugin
This tutorial explains how to install Android SDK and add Android Development Tools (ADT) plugin in Eclipse IDE for developing Android projects. If you already have an existing installation of Android SDK and want to update to the latest version refer this link on updating Android SDK and Eclipse ADT plugin.
- Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
- JDK 6 (Java SE 6). To install JDK, refer these links; in Windows, Ubuntu
- JRE alone is not sufficient
- Eclipse Indigo IDE for Java EE Developers (3.7.2).
- Android SDK 4.0.4 (Ice Cream Sandwich)
- ADT Plugin for Eclipse
Download and Install SDK Starter Package
Get the latest version of the SDK starter package from the link given below,
The SDK starter package is not a full development environment – it includes only the core SDK Tools. You can use Android SDK Manager, part of SDK tools to download the rest of the SDK packages (such as the latest Android platform).
Using Windows Installer (.exe file)
If you downloaded the Windows installer (.exe file), run it to install the SDK Tools into a default location (For simplicity and easy access, I have used C:\Android\android-sdk).
Installing Android platform
When you complete the installation wizard, it will launch the Android SDK Manager with a default set of platforms and other packages selected for you to install. Simply click Install to accept the recommended set of packages and install them.
This might take sometime to install the selected platforms and packages.
Using .zip or .tgz file
If you downloaded a .zip or .tgz (for Linux) package, extract it to a safe location on your machine, for example, C:\Android\android-sdk.
After extracting the files, open SDK Manager to install the recommended platform and other packages as shown in the above step.
Install ADT plugin for Eclipse
ADT plugin for Eclipse IDE lets 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.
- Open Eclipse IDE
- Select Help -> Install New Software…
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter the name as “ADT Plugin” and the Location as
- Click OK.
If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https”.
- In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
- In the next window, you’ll see a list of the tools to be downloaded. Click Next.
- Read and accept the license agreements, then click Finish.
If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.
- When the installation completes, restart Eclipse.
Configuring the ADT Plugin in Eclipse
After installing the ADT plugin, you have to define the location of the Android SDK in Android preferences in Eclipse:
- Select Window -> Preferences… to open the Preferences panel.
- 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.
- For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory. In my case, it is C:\Android\android-sdk
- Click Apply, then OK.
Adding Platforms and Other Packages
To download and install additional platforms and other essential SDK packages use Android SDK Manager.
You can launch the Android SDK Manager in one of the following ways:
- From within Eclipse, select Window -> Android SDK Manager.
- On Windows, double-click the SDK Manager.exe file available at installed directory.
- On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute:
To download and install packages, use the graphical UI of the Android SDK Manager to browse the SDK repository and select new or updated packages.