Published on

Setting Up an Android Development Environment

Authors

Some parts here mix English and Japanese and there are also areas I have not fully rechecked, but I hope this is still useful. This is how I set up an Android development environment on Windows and Ubuntu.

Steps

  1. Install the JDK
  2. Install Eclipse
  3. Install the Android SDK
  4. Install the ADT plugin
  5. Create an AVD: Android Virtual Device
  6. Create a sample project

1. Install the JDK

Windows:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Ubuntu:

$ sudo apt-get install default-JDK

2. Install Eclipse

Windows:

On Windows, it is easiest to download the all-in-one Eclipse package from the following site. http://mergedoc.sourceforge.jp/index.html#/pleiades.html

Choose the latest Ultimate edition or the Java development edition with JRE included. I also use CDT, so I usually download the Ultimate edition. Sometimes Eclipse behaves strangely if the file names inside the Eclipse directory become too long, so on Windows it is better to extract it directly under the drive root. I am not completely sure that this is the direct cause, but I have previously had cases where the CDT new project entry did not appear.

Ubuntu:

$ sudo apt-get install eclipse-platform eclipse-jdt

3. Install the Android SDK

http://developer.android.com/sdk/index.html

Windows:

On Windows, download the installer. After installing the manager, install the SDK itself.

Ubuntu:

Extract the downloaded archive and add the following lines to ~/.bashrc so that the SDK tools are on your PATH.

export PATH=$PATH:/path/to/android-sdk-linux/tools:/path/to/android-sdk-linux/platform-tools
$ android

Android SDK Manager starts. Set the radio button to API level, then check Tools, Android 2.3.3, Android 2.2, and Android 2.1. After selecting them, click Install Package to start the installation. It takes a while.

4. Install the ADT plugin in Eclipse

Start Eclipse and go to [Help] -> [Install New Software] -> [Add].

Name: ADT Plugin Location: https://dl-ssl.google.com/android/eclipse/

Check Developer Tools and install it.

5. Create an AVD: Android Virtual Device

Click the Opens Android Virtual Device Manager icon in the Eclipse toolbar. In the dialog that appears, create an AVD. Click the [NEW] button on the right and enter the following values.

Name:default Target: Android 2.3.3-API Level 10 Create AVD

Select the AVD you created from the list and choose Start -> Launch. If the emulator starts, the setup is good.

6. Create a sample project

Create a new Android project, right-click the project, and run it from Run As Android Application.