Setting Up the Environment
Once you have downloaded the Android SDK and Eclipse, let's uncompress the files and place them in a well known folder. Inside the Eclipse folder you will find the executable file to make it run. You don't need to install it. On the other hand the Android file we have downloaded is like an “Android Manager", where you can install, update new SDK elements and also create and run Emulator instances. Let's check the Android SDK folder:
You will find three folders and a readme file. Inside the “tools" folder we have all the files we need to work with Android. Let's execute the “android" file.
An application like the one in the image is shown:
We are going to focus on installing the Android SDK we need, so select “Avaliable packages" and a list of Android SDK's will be displayed. Choose one, the latest for example (at the time I'm writing this article, the latest Android SDK is the 2.3.3 (API 10) and the HoneyComb Preview (Android 3.0).
Download and install the components.
Once done, if you click on the “Installed packages" you will see the recently installed SDK components.
Now, let's enter Eclipse and install the Android plugin (ADT).
In the “Help" menu, select “Install new software"
Add the following url to the top box:
Wait until the content is loaded in the middle screen, select all the “Development" tree, follow the steps to install it. You will be asked to restart Eclipse. Do it.
Now, once restarted, click on Window → Preferences menu option. Click on the Android label. You will see a screen like this:
This is where we have to say to Eclipse where the Android SDK is. So browse through the folders and find it. Point to the base folder of your Android files (the one which contains the /platform folder).
Once done, you can create Android projects using the File → New → Other → Android Project.
So this is all. You have successfully set up Eclipse to work with Android.