Getting ready for Android development
If you want to get started with Android development, you’ll need to setup some things like the SDK, an IDE and an AVD. In this post I will walk you through the setup of these things, creating a test project and getting the project running on the emulator. When you’ve done all that, you are ready for some Android development, which I will cover in future posts.
Download the Android SDK
First of all, you need to download the Android SDK. You can find on the Android developers site, in the SDK section. I’m using the mac x86 1.5 R3 version in this tutorial which is 175MB when writing this post.
When downloaded, extract the zip file (I recommend you do this in a folder you know will never move, like /programming/sdk) and we are finished with this folder for now.
Installing Ecipse and the Android Development Tools
I’m using Eclipse for most of my development and it looks like google did a great job on their Android Eclipse plugin, so that’s what we’ll use for our development.
- In order to use this plugin, we will need Eclipse itself. Download Eclipse for java developers from the Eclipse site. I recommend the Cocoa version.
- Extract the downloaded file into your /Applications folder and fire up Eclipse.app.
- In your application menu select: Help > Install New Software …
- Hit the Add button and give a name that makes sense (“adt” or “android development” tools for example). For location, enter https://dl-ssl.google.com/android/eclipse.
- When you push the Ok-button, Eclipse will load the the available components. Select Developers Tools (make sure the nested components are checked as well) and hit next.
- You’ll be presented with an overview of installations, just click next. Then accept the license and hit finish. Eclipse will now install ADT.
- Restart Eclipse.
- Now we need to let ADT know where he (or she) can find our SDK. Go to your preferences (windows: window > preferences. Mac: Eclipse > preferences).
- In the left panel, select Android (you might get a warning your SDK is not setup yet, but you can ignore that because that’s what we are doing now). Click browser and navigate to the sdk folder we extracted. This must be the root map you downloaded. The one with folders like tools and platforms in it.
Create an Android app.
Now that we have everything ready to go, it’s time to see if everything is set up correctly and create our first Android app.
- In your menu, select: File > New > Project.
- In the dialog that should pop up, select Android Project and hit Next.
- Now we can set some parameters for our new project. Give a name (“HelloAndroid” for example).
- Choose a build-target. Unless you have some specific needs, you should choose the lowest version possible. We’ll go for 1.1.
- Give an application name. This is the human readable name for your app.
- Give a package for your source to go. I’ll go for be.dimitrivanheucke.blog.android.helloandroid.
- Make sure Create an activity is checked. This will create a Class for us that is our main starting point. Call it HelloAndroid
- Your dialog box should now look something like this;

- Hit Finish and ADT will create your project
Testing your application
Before we can test our application, we need to create an AVD (Android Virtual Device). This will be used to present our application in the emulator.
- Open your terminal and go to the tools folder inside your downloaded SDK folder.
- To create an AVD we need to specify a target. To get a list of targets type;
./android list targets
The outcome should look like this;
Available Android targets: id: 1 Name: Android 1.1 Type: Platform API level: 2 Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P id: 2 Name: Android 1.5 Type: Platform API level: 3 Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P id: 3 Name: Google APIs Type: Add-On Vendor: Google Inc. Description: Android + Google APIs Based on Android 1.5 (API level 3) Libraries: * com.google.android.maps (maps.jar) API for Google Maps Skins: HVGA (default), HVGA-L, QVGA-P, HVGA-P, QVGA-L - Now we can actually create our AVD. Type;
./android create avd --name myavd --target 3
Of course you can change the name (myavd) in whatever you like. I used target 3 so we can use this AVD for other projects as well (for example when we integrate Google Maps).
So we will have a 1.5 OS on our virtual device but we can run any application that targets that sdk version or lower.
We are done with terminal now, so we can go back to Eclipse. - Now we are ready to test or application! Hit the run button
in the toolbar at the top of your window and select Android Application in the Run As dialog that pops up. After clicking Ok your emulator should load and open your application. This can take a while, your emulator first has to install your application. You might have to unlock the screen first by clicking on the menu button at the bottom of your (android) screen.
If, like me, you get some errors on your console panel at the bottom of the window looking like this;
[2009-08-12 15:02:57 - HelloAndroid] no classfiles specified [2009-08-12 15:02:57 - HelloAndroid] Conversion to Dalvik format failed with error 1
You should go to the properties of your project (right mouse click on the project > properties), go to java build path and make sure Android 1.1 is checked in the Order and Export tab.
That’s all for setting up your environment and run a first test project.
I’m planning on doing some more of these but haven’t decided on the topics yet. So if you want to see something in particular, let me know in the comments. For the next one I was thinking about integrating Google Maps.












June 21st, 2010 at 4:08 am
Hi,this is Thanh Madras,just found your Post on google and i must say this blog is great.may I quote some of the writing found in the weblog to my local buddies?i am not sure and what you think?anyhow,Thanks!
June 25th, 2010 at 7:34 pm
A study conducted in healthy postmenopausal women showed that a morning/evening menopausal formula containing green tea was effective in relieving menopausal symptoms including hot flashes and sleep disturbance. Further studies are needed to confirm these results.
June 29th, 2010 at 6:49 pm
Very nice desgin of your site. It is individual and compares to your posts. Don’t give up and make your own thing!
July 3rd, 2010 at 4:45 am
Terrific Post. Far better then the simillar post I checked 2 days ago on Blogspot. Maintain up the good perform.
July 3rd, 2010 at 1:33 pm
The world was created by a single thought! scribd.com/doc/33817269 Read it for your own advantage
August 3rd, 2010 at 6:02 am
uXPAA4 http://fgb7s3Ffjsev7yrbvqqcf7.com
August 7th, 2010 at 7:12 am
Hi person, I was scouting around bing and seeking out an article to browse and came across your web site. I am really pleased I did, you put up some terrific info. Did a fast bookmark on this site and will likely be checking back every once in a while to see if you publish any more stuff. Fascinating stuff keep up the wonderful work.
August 21st, 2010 at 9:59 am
I have had the iPhone 3g and iPhone 3gs, and I now have a HTC. I like that fact that the phone isnt locked down like the iphone is. The only issue are the apps. These needs improving if Android wants to really compete with iOS.
August 25th, 2010 at 4:49 pm
Good read. I discovered your web page from a google search, and was glad i did. The details has helped me immensely.
August 26th, 2010 at 4:59 pm
Admirable website! I’ll probably be referencing some of this details in my next speech. I would appreciate it in the event you visited my website at
September 1st, 2010 at 4:50 pm
Admirable blog! I’ll possibly be referencing some of this info in my next speech. I would appreciate it if you visited my website at
September 5th, 2010 at 11:59 am
We’ll be a lot better off with this.
September 5th, 2010 at 2:19 pm
Hi. I wanted to thank you for the excellent information you’ve posted on your web page. I will definitelycome back to check it out once again and have subscribedto your RSS feed. Have a fantastic day.
September 5th, 2010 at 3:16 pm
Hi. I wanted to thank you for the fantastic info you’ve posted on your web page. I will definitelycome back to check it out once again and have subscribedto your RSS feed. Have a great day.