Hello all future android rock-stars. Beginning today droolJunkie is going to have a weekly post where we together will be learning how to develop on Android.
Week 1: Setting up the tools of the trade

Google provides very powerful tools to develop on the Android platform. They not only have command line tools but also provide the Android Development Tools (ADT) to develop application on Eclipse, the IDE we will be using. But before we install Eclipse we will need the Java Development Kit (JDK). Chances are you will already have java installed , if not , windows and Linux users can download java from java.com ; Apple provides their own version of java . if you are on Debian or Ubuntu you can also run “sudo apt-get install sun-java6-jdk” to install Java.
Now that we have installed Java go ahead and download Eclipse from http://www.eclipse.org/downloads . Download the “Eclipse IDE for Java EE Developers”. Its basically a zip archive which we would just need to extract to run Eclipse.
While Eclipse is being downloaded head over to http://developer.android.com/sdk/index.html to download the Android SDK.
Depending on the Operating System you are running select one of the three download links.
Once this is down extract it to a location of your choice, you wont be accessing the files directly so they need not be on the desktop.
By now your Eclipse download must be done, we need it to extract it, anywhere will do , I usually extract it to the desktop for quick access.
If we did everything correctly we should be able to open up the Eclipse folder and run it by clicking the Eclipse executable.
Now we need to install the ADT on eclipse. Follow the following steps:
1. Click on “Help” in Eclipse
2. Click on “Install New Software”.
3. Click on “ADD” , Type in a name of your choice, I just use “Android ADT”. In the source box provide the following URL “https://dl-ssl.google.com/android/eclipse”and click OK .
Eclipse is going to query the address we provided and in a few moments it will provide us we a set of plugins, namely Android DDMS and Android Development Tools under Development Tools.
4. Select the parent, i.e., “Development Tools” and click “Next”.
5. Accept the Terms of service and continue.
Note: During installation it will alert you saying that the content is not signed, don’t worry just click OK.
We now need to tell the ADT where our SKD is, so:
1. Click on Windows on the File Menu
2. Click on Android SDK and ADT manager ,which would open a new window up.
3. Now you need to provide the location the folder you extracted the SDK to.
4. Click on available packages on the left in the same window which after querying the Internet will show you a list of packages to install. Unless you have a non 2.1 Android device just select “Documentation for Andorid SDK , API 7 , SDK Platform 2.1 , Samples from SDK 2.1” . If you have an older device you may install its SDK platform too, I usually Install the 1.5 SDK as my device is still waiting for an official upgrade.
5. Now click on Virtual Devices on the left to set up our first virtual device.
6. Click on New and provide it a name you like, I usually just provide the version of the API. Select a desired target, provide a nice amount of ram ( 128 will be more than enough) and click create AVD.
7. Start the AVD , this takes a little while so lets build out “hello world” program while the AVD boots up.
Create A new project in Eclipse by clicking File -> New Project. It will show you a bunch of projects you can build , search for Android , select Andorid Project and click Next. Now it will give you a bunch of options which you need not worry about currently , just provide the following values
- Name: Hello World
- Target : 2.1
- Application Name : Hello World
- Package Name : com.<your name>.hello
- Create Activity:begin
- Min SDK Verison : 7
Now click finish , Eclipse would create the necessary files and folders. To run the app press Ctrl+F11 , it will ask you how to run the app , select Android Application.
This will open up the AVD is not already open else after loading the application the AVD will switch to the application and you should see “hello world” written.
Thus we have correctly set up the development environment and also run out very first application “hello world”.
Next week will learn more about the structure of the application and make a few minor modifications to our hello world application.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
