Setting up Android SDK to use with Eclipse


Environment

  • Windows 7
  • Eclipse Indigo Classic
  • Java SE Development Kit (JDK) 7 Update 5

Preparation

Download the following:

The steps to install and setup Android SDK to use with Eclipse are:

  1. Install Java SE Development Kit
  2. Install Eclipse IDE
  3. Install Android SDK
  4. Install the Eclipse Plugin

The installation of 1 and 2 are straight forward and will not be covered. I will only cover steps 3 and 4 – installing Android SDK and its Eclipse plugin.

Install Android SDK

The SDK downloaded is an executable that installs the core SDK Tools which can be used to download and install the rest of the packages. Launch this executable to install the core SDK Tools.

Once the tools are installed, the installer offers to start the Android SDK Manager. Start it and select the following required and recommended packages and items to install:

Please note that the following are required:

  • SDK Tools
  • SDK Platform-tools (for first time installation)
  • SDK Platform (at least one platform to compile your applications)

The status of each item changes to ‘installed‘ after it has been successfully installed.

Install the Eclipse Plugin

Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT). This plugin is designed to give you a powerful, integrated environment in which to develop Android apps. It extends the capabilites of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.

To install, do the following:

  1. Start Eclipse, then select Help > Install New Software….
  2. Click Add and use the following details:
  3. Click Ok
  4. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.

You should see the following if the plugin was successfully install when click on the Eclipse Windows menu, in particular the 3 Android items on top of Preference:

Configure the ADT Plugin

After installing the plugin and restarting Eclipse, check to ensure that the location of the Android SDK Directory is specified:

  1. Under Windows > Preference, on the left pane you should see ‘Android
  2. Click to select ‘Android‘ and ensure the location is set to where you’ve placed the SDK during its installation.
  3. If not, click browse to select the Android SDK directory.
  4. Click Apply

android-eclipse-plugin-install-7

Important:

If you do not see ‘Android‘ in the left pane, check to ensure you’ve installed all the required and recommended packages and items, in particular, ensure that the item Google USB Driver under Extras is installed.

You’re done!

Congratulations! You’ve made it to the end! There should now be an Android project type in Eclipse’s New Project dialogue.

eclipse-android-new-project

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s