Getting ready for Android development
In: Android
27
Oct
2009
Here are the steps I took to get my Android development environment set up on my Windows 7 64-bit box.
- Download and install Java Development Kit SE: JDK 6 Update 16.
File name I ended up downloading was jdk-6u16-windows-x64.
- Download and unpack Eclipse IDE for Java Developers.
File name I ended up downloading was eclipse-SDK-3.5.1-win32-x86_64.zip.
- Download and unpack Android SDK.
File name I ended up downloading was android-sdk_r3-windows.zip.
- Changed android.bat inside Android SDK according to this tip.
- Start a command prompt as administrator and run the following command from the tools folder of the Android SDK:
android update sdk
- Fixed error “Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.” by doing as it says and then clicking Update all button under Installed packages. Not sure why this was needed because the https link loaded fine in my browser.
- Select “SDK Platform Android 1.5″, Accept and then Install Accepted. Actually I ended up downloading all platforms (not sure why, but I have room so what the heck). This means 1.1, 1.5, 1.6, 2.0, documentation
- Start Eclipse and accept the default workspace location (or change – it is just the place to put your projects and files). Choose Help, Install new software. Input the following link and click Add button.
https://dl-ssl.google.com/android/eclipse/
Type a name for the link/source and ok. Check “Developer Tools” once it appears in the list and click Next, Next, I Accept and Finish. I got a warning about unsigned content, but accepted with OK. Also, a Yes for restarting Eclipse.
- Choose Window, Preferences inside Eclipse. Under Android, Browse for the location where you unpacked the Android SDK. I clicked Apply, but it seemed to take a while and maybe another click and/or another Browse attempt before the list filled up with my targets “Android 1.1″, “Android 1.5″ etc. OK.
- Choose Window, Android SDK and AVD Manager inside Eclipse. Click New under Virtual Devices. Type a name for your phone emulator and select your target platform, Android 1.5 for me. Type a size for your emulated SD card, I chose 200 MiB. I did not create any additional hardware abstractions (yet, will probably come back later). Then Create AVD and close the dialog box.
- Choose File, New, Project inside Eclipse. Select Android Project and Next. Type a name for your project and select your target platform. I’m going for Android 1.5 which is on my HTC Hero at the time of this writing. Also input values for the following fields, for example:
Application name: My App
Package name: com.mycompany.myapp
Create Activity: MainActivity
And complete with a click on Finish. Now, you may think nothing has happed, but it has. Just click icon on right which saids “Workbench” when you hover on it. There you have your project and source files to work with!
- Click Debug button in toolbar in order to test the application in the emulator. Select Android Application and off you go. Even on my Intel Core i7 processor it takes some time to get the app running inside the emulator, about 1 minute! Note however, that if you keep the emulator running, it only takes about 5 seconds to launch a new version of my application from within Eclipse.
That’s it. Now off for some educational reading in how to write Android applications. I hope to get back on that matter.
11 Responses to Getting ready for Android development
Keyston
November 14th, 2009 at 21:36
Thanks for this , just got a driod and about to dive into developing a small app
Marry
November 30th, 2009 at 11:40
Thanks for giving details explanation about how to configure Android platforms.
I was struggling for 3 weeks to get target option in New Project Create dialog.. now i created a new project without any problem.
Thank you for your guidance .
~Marry
srpanpaliya
December 6th, 2009 at 02:11
Thanks for the detail documentation. It has saved my lots of time.
Billy Scholtz
December 9th, 2009 at 18:24
You are brilliant. Where are you based?
admin
December 9th, 2009 at 19:09
Thank you (all!). I’m just glad to help. I’m in Sweden.
dan
December 31st, 2009 at 21:56
Was stuck on the SSL error, this helped me figure it out. Thank you!
tony
January 8th, 2010 at 00:14
Thanks so much. Just in case anyone runs into my problem – I got an error when creating new project – about gen files. Click Project->Clean and everything runs fine. No idea what caused the error.
Aqeel
January 13th, 2010 at 01:36
thanks buddy.it was very helpful.
libcues
February 9th, 2010 at 07:10
mr. plate – greetings—I am starting prepare the makeshift hideaway where i will make my best attempt at a very unique app. I messed around with the source code a few months back and (thats how I learn, by messing around without proper instruction) and I have this question — I enjoyed your rundown and its on the wall, but what changes do you know about that may have occured between october 2009 and now? Any items I should read up on? I’m sure I’ll find out eventually, the easy way, or the hard way (but does it have to be the hard way?)
cheers and to the readers — i hope you had an astonishing time with that code and are enjoying your successes!
Balu
February 11th, 2010 at 03:52
Great article.I am getting some errors initially but this article and comments solved my problem. Thanks
Toni
February 22nd, 2010 at 11:47
Thanks a lot. It was very helpful for me.
-Toni