Installing the Android Development Environment
IMPORTANT: This document walks you through the installation of the Eclipse™-based Android™ development environment as recommended by Google. Motorola has developed its own Eclipse-based development environment—MOTODEV Studio for Android—that is both more powerful and simpler to install. MOTODEV Studio for Android can be used to develop applications for a variety of Android-based handsets; it is not limited to those available from Motorola. To install it, see Installing MOTODEV Studio for Android.
Installation of the generic Android development environment (which uses Eclipse as an IDE) is a matter of:
- Verifying that your development computer meets the minimum requirements
- Downloading and installing the Android SDK
- Downloading and installing Eclipse (if you already have a suitable version of Eclipse [as noted in the System Requirements] installed on your development computer, you can skip this step)
- Using Eclipse's Software Update mechanism to download and install the Android Development Tools (ADT)
Once you have installed all of the necessary software, you can verify your installation by creating a quick "Hello World"-style application and deploying it on an emulated Android handset.
Verify That you Meet the System Requirements

Before installing, you must verify that your development computer meets the system requirements set out by Google.
- Point your web browser to http://developer.android.com/. Click the SDK tab at the top of the page.
- On the left side of the page, under "Current SDK Release", click System Requirements.
- Ensure that your machine is running one of the listed operating systems, and that it has the proper JDK (Java™ Development Kit) as listed under "Eclipse IDE". If you need the JDK (the JRE alone is not sufficient; you need the full JDK), download the latest from http://java.sun.com/javase/downloads/index.jsp and install it. Download the 32-bit version even if you have a 64-bit computer and operating system.
Download and Install the Android SDK
- Point your web browser to http://developer.android.com/. Click the SDK tab at the top of the page.
- On the left side of the page, under "Current SDK Release", click Download.
- Click the appropriate link to download the SDK for your host platform. Note that you will need to agree to the terms of the Android SDK License Agreement.
- Unzip the downloaded file to a directory of your choosing on your development computer. Within the chosen directory, the zip file unpacks as a directory named for the platform, release, and build (for instance, android-sdk-mac_x86-1.5_r1).
- So that you don't have to supply the full path to the Android tools directory[1] when running tools from the command line, add it to your path:
- On Microsoft® Windows®, right-click My Computer and select Properties. Select the Advanced tab and click Environment Variables. In the Environment Variables dialog, under System Variables, select Path and click Edit. Append the full path to the tools directory, separating it from the preceding path using a semicolon. Close all dialogs.
- On Linux®, edit your ~/.bash_profile or ~/.bashrc file. If either sets the PATH environment variable, edit it so that it includes the full path to the tools directory. If neither file sets PATH, add the following line to either of the files:
export PATH=${PATH}:full_path_to_your_android_sdk_tools_dir - On Mac OS® X, look for a .bash_profile file in your home directory. If this file doesn't exist, create it with a single entry:
export PATH=${PATH}:full_path_to_your_android_sdk_tools_dir
If you already have a .bash_profile file, check to see if it sets the PATH environment variable. If so, edit it so that it includes the full path to the tools directory. Otherwise, add the above line to it.
Download and Install Eclipse
- Go to http://www.eclipse.org/downloads/. Find the entry labeled "Eclipse Classic" (as of this writing, version 3.4.2) and click the link on the right side appropriate for your platform.
- From the page that appears, download the archive (.zip or .targ.gz depending upon your platform).
- Extract the downloaded file to an appropriate location, such as C:\Program Files\ or /Applications/. Extraction creates a directory named
eclipsewithin the chosen location. - If desired, create a shortcut that will simplify the launching of Eclipse:
- On Windows, open the eclipse folder, right click eclipse.exe, select Send To, and then select Desktop (create shortcut).
- On Mac OS X, open the eclipse folder and drag Eclipse.app to the Dock.
- Launch Eclipse. You will be asked to select a workspace:

- Specify a directory into which all of your Android projects should be stored. Note that you will probably want to create a new directory just for this purpose. If you do not want to be prompted for a workspace directory each time you launch Eclipse, select Use this as the default and do not ask again. Finally, click OK.
Eclipse launches, and the Welcome view appears. - On the right side of the Welcome view, click the Go to the Workbench icon:

- You should now see the Eclipse workbench:

Install the Android Development Tools (ADT)
NOTE: Eclipse uses its own proxy settings (and not those of your host computer) when accessing the Internet. If you access the Internet through a proxy server, you must configure Eclipse accordingly. Select Preferences from the Window menu (on Mac OS X, Preferences are located in the Eclipse menu). On the left side of the Preferences dialog, expand General and select Network Connections. Select Manual proxy configuration and fill in the fields as appropriate for your network setup. (Note that the Android Development Tools are installed using https; thus, you need to configure the SSL proxy.) Click OK when done.
- From within Eclipse, select Software Updates from the Help menu. The Software Updates and Add-ons dialog appears.
- At the top of the dialog, click Available Software.
- On the right side of the dialog, click Add Site. The Add Site dialog appears.
- Enter the following URL into the Location field and click OK:
https://dl-ssl.google.com/android/eclipse/ - The URL you just added should now appear in the Available Software list. Click the checkbox to the left of it, and then click Install.

- When the Install dialog appears, asking you to review and confirm the software being installed, click Next.
- You are now asked to review and accept the licenses for the software being installed. If you accept them, select I accept the terms of the license agreements and then click Finish.
The Android Development Tools are downloaded and installed. - When installation is complete, you will be asked if you want to restart Eclipse. Click Yes and let it restart.
Once Eclipse has restarted, you have one last task to perform: you need to tell Eclipse where the Android SDK resides. - Open the Preferences dialog (on Windows or Linux, Window > Preferences; on Mac OS X, Eclipse > Preferences).
- On the left side of the Preferences dialog, click Android. A warning dialog appears, indicating that the location of the Android SDK has not been set up. Click OK to dismiss the warning.
- In the SDK Location field, specify the directory that contains the Android SDK.
- Click OK to register the SDK with Eclipse and close the Preferences dialog.

Test Your Installation
First, you must create at least one Android Virtual Device (AVD)[2] to which you can deploy applications. Note that AVDs can be re-used; you need not create a new one each time you want to run an application.
- Open a Command Prompt (a Terminal window).
- Change to the Android SDK Tools directory. For instance:
cd \android-sdk-windows-1.5_r1\tools - Enter the following command to create an AVD named "android1_5":
android create avd -n android1_5 -t 3The "-t 3" specifies that the target device runs Android 1.5 (API level 3) and supports the Google APIs; to create a target running Android 1.1, you would use "-t 1" instead.
Now, from within Eclipse, you can create and run an application:
- Click File > New > Other. From the list of wizards, select Android > Android Project and click Next.
The New Android Project dialog appears. - Fill out the dialog as shown below (making sure to select Android 1.5 as the Build Target), and click Finish.
The project is created and added to the Package Explorer.
NOTE: If you see errors in the Console view ("no classfiles specified") and the project name in the Package Explorer has a small red 'X' icon attached to it, right-click the project name in the Package Explorer and select Refresh.
Right-click HelloAndroid in the Package Explorer, and select Run As > Android Application.
The emulator launches in a separate window. Note that the emulator takes a few minutes to fully launch.
Watch Eclipse's Console view for an indication of how the launch is proceeding. In particular, when the "Uploading..." and "Installing..." messages appear, your application is being transferred to the emulated device. Then, the "Starting activity..." message indicates that your application is being launched.

Footnotes
1. This is the directory named tools within the unpacked Android SDK directory. For instance, C:\android-sdk-windows-1.5_r1\tools.
2. Each AVD is a particular configuration of hardware options, system image, data storage, and an emulator "skin," all of which emulates an actual device. You can create multiple AVDs to enable testing on different emulated device types.