As you read this, you are most likely to be tapping on a smartphone screen. In this era of smartphones, Android development is one of the most demanded skills out there.
First off, we will stick to Eclipse. We will first set up a generic Java development environment, followed by the necessary tools on top of it for Android programming functionality.
Before doing any installation, fetch all the necessary tools to your hard drive. Here’s a list of what you need:
- Eclipse IDE for Java Developers
Download from: http://www.eclipse.org/downloads
- Java Development Kit (JDK), contains libraries for Java development
Download from: http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Android SDK tools (contains the Platform and Build tools)
http://developer.android.com/sdk/index.html#ExistingIDE ; click “USE AN EXISTING IDE” > “Download the SDK Tools for Windows”.
- Android Development Tools (contains libraries for Android development; it is dependent on JDK)
Download from: http://developer.android.com/sdk/installing/installing-adt.html, scroll to the bottom of the page, “Troubleshooting ADT Installation” section.
- First off, install JDK.
- After JDK installation, go to your Computer properties. On Windows 7, 8 and 8.1, right click on Computer/This PC, click Properties and then in the window that appears, click “Advanced system settings” in the left pane.
- Go to the “Advanced” tab in the window that appears, and click the “Environment Variables…” button towards the bottom.
- Add a new variable in the “User Variables” section, with the name JAVA_HOME, and the value should be the address that points to your JDK installation:
- Do not close the window. In the System variables section, find the “Path” variable, and click Edit:
- At the end, append the path to your JRE installation (include the semicolon in the beginning and the /bin at the end).
- Save your configuration; extract Eclipse in a directory such as C:\ and create a shortcut for eclipse.exe on your desktop.
- At this point, your Eclipse has been set up for Java development. Move onto the next steps for Android development.
- Once the installation completes, the installer offers to start the Android SDK Manager. DO NOT start the Android SDK Manager.
- Install the ADT plugin in your Eclipse installation. There are two ways to do this. Either install it from the online repository, or download it first, and install it as an archive. I recommend installing it directly from the repository, because even if you are installing it from the archive, a lot of dependencies have to be downloaded from the internet during install. To install it directly from the online repository,
- Start Eclipse, then select Help > Install New Software.
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter the following URL for the Location:
- Click OK and follow the steps to complete the installation (you will need to accept the license agreement).
- If you downloaded ADT as an archive, follow the method here:
- Fire up Eclipse. You will get a warning that the Platform tools and Build tools are absent.
- The required tools will be checked by default, just click the “install packages” button. (Do not compare your selected packages with mine, since the screenshot was taken during the installation, when some packages had already been installed).
- 13. If you get an error, close SDK tools, and run it from the Start Menu or the Start Screen in elevated (administrator) mode by right clicking on it.
- Wait for the installation to finish:
- Once it’s done, congratulations. Your computer is all set for Android programming. Fire up Eclipse to create a new project straight away.