Download and configure prerequisite software
- Download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/ .The installation process is straightforward. If you already have the JDK installed on your system, you can skip this step, but be aware that your JDK, Eclipse IDE, and OS need to be compatible.
- Download the Eclipse IDE for Java Developers from https://www.eclipse.org/downloads .After unzipping the package, you can run Eclipse directly. There is no installer.
- Download the Android SDK ADT Bundle from https://developer.android.com/sdk/index.html .This bundle includes Eclipse. If you already have Eclipse installed on your system, you can download the SDK Tools for your platform from the Use An Existing IDE section.Unpack and install to a location you will remember. You will need to reference this in a later step.
- Configure the Android SDK.
- Open a terminal (in Mac OS X) or a command prompt (in Windows).
- Navigate to the directory where you downloaded/unpacked the Android SDK.
- Go to the tools folder, which contains a file named android.
- Run the following commands:
- For Mac OS X/Unix:
chmod +x android android update sdk --no-ui
- For Windows:
android update sdk --no-uiThis process takes a while.
- Configure Eclipse.
The Android SDK is now installed. 1. Configure Eclipse so it can find the Android SDK and use it as a resource.
- Start Eclipse.On Windows, if Eclipse does not start, and the issue reported is that Eclipse cannot find a required Java file, try the following:
- add -vm C:\[path to your JDK bin]\javaw.exe to your eclipse.ini file.
- Select Help > Install New Software .
- Click Add... .
- Enter Android for the name.
- Enter https://dl-ssl.google.com/android/eclipse/ for the Work with link.
- Click OK .You should see a dialog similar to this:
- Select the resulting packages (those in Developer Tools and NDK Plugins) and click Next .This downloads the Android Development Tools (ADT).
- After the download completes, restart Eclipse.
- Open Eclipse.
- Select Window > Preferences on Windows; ADT > Preferences on Mac OS X.
- Select the Android tab.
- Browse to the location of the Android SDK.
- Click Apply .