Monday, January 4, 2010

Getting started with Android Development using Eclipse


The Google Android platform offers a easy and quick way to develop applications for the mobile device. First of all, lets start with the tools we will need to start developing our own Android applications.

The best IDE (Integrated development environment) t to develop Android is Eclipse.



The Android SDK

We will need another tool to work with Android. This tool is called the SDK (Software Development Kit), we have download it from here and place in somewhere handy on your computer (C:/Android/SDK if we are on Windows, for example, or ./home/YOURUSERNAME/Android/SDK if we use a *nix system).

It doesn't really matter where you put it, just don't forget where, because in next steps we will have to enter the path to the SDK into the Eclipse environment.


Eclipse

Once we have downloaded the SDK we will need the Android plugin for Eclipse. There are a couple of different ways of doing this, depending of the version of Eclipse you are using:

For Eclipse Ganymede :

* Start Eclipse.
* In the Menu, select "Help" and then "Software Updates".
* In the new pop-up window, push the button "Add site ... " and enter the following address and click Ok:

https://dl-ssl.google.com/android/eclipse/

*
* Once this is done, you have to go back to the Updates and Add ons menu. The location we have entered before should appear, click on it, check the "Developer Tools" and click Install.
* Follow the steps to install the plugin.

For Eclipse Europa version

* Start Eclipse
* In the Menu, select "Help" , "Software Updates" and then "Find and Install".
* Click on New Remote Site
* In the new pop-up window, paste 'https://dl-ssl.google.com/android/eclipse/', and click Ok:

* One this is done, the new site should appear in the Add ons list. Click on it and check both “Android Developer Tools” and “Android Editor”.
* Follow the steps to install the plugin.

Hint: If the https://dl-ssl.google.com/android/eclipse/ doest work try "http" instead of "https".

Once we have installed the Eclipse plugin we have to restart the IDE. Now, its time to point to the plugin where the SDK is in our system.

In the Menu, “Window”, select “Preferences”. Select Android from the left panel, click the “Browse” button and locate the SDK directory in your computer, then click OK.

Now we are able to create Android applications on our Eclipse IDE.

1 comment: