Setting Up an Android Development Environment

There are two mainstream Android development environments:

1. Android Studio by Google

The first one sounds very professional just from the name, and it’s made by Google. It’s fairly stable now. However, due to certain conditions in our country, *.google.com is very hard to access, and it’s been getting worse recently. Android Studio is heavily dependent on network access. After downloading and using it, I found it inconvenient. For users with easy internet access, I recommend considering it. Domestic download link: http://www.android-studio.org/

2. Eclipse

Eclipse is currently a very popular IDE for Android development.

I recommend a very professional domestic website: http://www.androiddevtools.cn/

This website covers all the Android-related resources you’ll need.

image001

The required setup is as follows:

Java

Official site: http://www.java.com/zh_CN/

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> JDK

Eclipse

Official site: http://www.eclipse.org/downloads/

Recommended: IDE For Java EE. Eclipse has different versions; I downloaded the latest one at the time, Mars.

ADT (Android Development Tools): Eclipse Plugin

Eclipse is a powerful, extensible, open-source IDE with many plugins. ADT is one of them.

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> ADT Plugin

How to install ADT:

  1. Download the latest rar archive to your local machine.
  2. Open Eclipse, go to Help -> Install New Software

image003

  1. Click Archive, select the local archive, and set the Name to ADT.

image005

After installing ADT, if these two icons don’t appear in Eclipse’s toolbar, go to Eclipse -> Window -> Perspective -> Customize Perspective and check the boxes. One icon manages the SDK and the other manages AVDs. AVD stands for Android Virtual Device - a simulated Android device.

image009

  1. Select All, click Finish.

Android SDK-Tools

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> SDK Tools

Download and install to your chosen directory. The final directory size can be quite large, so make sure you have enough space.

In Eclipse -> Preferences, specify the SDK Location.

image011

Android SDK

You can see my Location shows Android 4.3.1, but yours might not have anything. That’s because you need to install specific SDK packages.

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> SDK

Download the packages. I recommend downloading version 4.0.0 or later.

Copy the extracted folder into the Platforms folder inside your Android SDK-Tools directory. Create the folder if it doesn’t exist.

Android Build-Tools

These are the Build-Tools needed for Android development. Download and extract, then copy or move the entire extracted folder to your-sdk-path/build-tools.

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> Build-Tools

Android Platform-Tools

This is the package containing adb, fastboot, and other tools. Place the extracted platform-tools folder in the android sdk root directory, and add the directory containing adb to your system PATH so you can access adb, fastboot, and other tools directly from the command line.

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> Platform-Tools

Android SDK System-Images

These are the system images needed when creating emulators - they’re what you select for the CPU/ABI option when creating an emulator. Download and extract, then copy or move the entire extracted folder to your-sdk-path/system-images. If the system-images directory doesn’t exist, create it first. Then open SDK Manager, go to the Tools menu, select Options to open the Android SDK Manager Settings dialog, click Clear Cache, and restart Eclipse (or Android Studio) and SDK Manager.

Androiddevtools link: http://www.androiddevtools.cn/ Select Android SDK Tools -> System-Images

AVD

Create an AVD for debugging.

Click the AVD icon, then click Create. Configure it according to your needs.

image013

Create a New HelloWorld Project

In Eclipse: File -> New -> Other -> Android Application Project, then keep clicking Next and Finish.

Here’s the result:

image015