Installing Eclipse and the Android SDK (Windows XP)

Last Updated:

  1. devolio

    devolio Well-Known Member

    The first thing we need to do is download all of the needed files. First up, the Android SDK. You can download it from

    Now, let's download Java. Open up in your browser. Click the expand button [+] for Java SE and click on Java SE (JDK) 6. It will take you to a page with more choices. We're going to want JDK 6 Update 10 with Java EE. Select Windows, and the Language you want, and you can finally download the JDK.


    Last but not least, we're going to need Eclipse. Head over to The version we want is Eclipse IDE for Java Developers. The JEE version will work as well.


    Now, we've downloaded just about everything we're going to need.

    Let's go ahead and fire up the JDK installer.


    Click next, agree to the license, next again (installing to C:\Sun\SDK), and we'll be prompted to set the admin password.


    Enter a password and click next. Now we'll be presented with the installation options. You can leave these default and click next. Finally, it will let you install what we've chosen.


    Click install now.

    Time to wait. Grab something to drink (or eat).


    At the end of the install we'll be prompted to sign in (if registered.) You can sign up if you'd like, or log in if you've already signed up. You can also skip the whole process if you want.


    Tah dah, that's finished. You can click Finish, skipping starting the server (we won't need it.)


    Now we can get started on the fun stuff. Create a new folder on your C: Drive (or whatever you use,) and name it android. Open up the Android SDK zip, and go into the main folder. Copy all of the files from the Android SDK zip into C:\android.


    We've now got to set the all important Path variable. Right click on My Computer and click Advanced, Environmental Variables (or Start -> Settings -> Control Panel -> System -> Advanced -> Environmental Variables.)


    In the Environmental Variables window, in the System Variables pane, scroll down to Path. Double click on it to edit it. Scroll all the way to the right side of the value, and add ";c:\android\tools" (or the absolute path to your tools folder,) to the end of it, as shown below.


    Click OK in all of the windows, and that's good to go.

    Time for Eclipse. Create a new folder on your C: Drive (or whatever you use,) and name it eclipse. Just like before, open up the Eclipse zip, go into the main folder, and copy all of the files into C:\eclipse.


    Almost there! Go ahead and make a shortcut to Eclipse on your Desktop (if you want.) Start up Eclipse.


    It will prompt you to choose a workspace location.


    This is where all of your project files will be stored. Set it where you want, and click OK.

    Once Eclipse is started up, we can add the ADT plugin. In the menu, Help -> Software Updates.


    Click on the Available Software tab at the top.


    Click on Add Site. For the URL, we're going to use


    Click OK. It may tell you that there was no repository found at That's fine, Click OK.

    Expand the tree for (note http, not https.) Click the checkbox next to the tree expander, and it will select all of the tools.


    Click Install. Eclipse will go ahead and calculate the installation stuff it needs, and download the files.


    Click finish, and it will install them.


    Eclipse will prompt you to restart, click Yes. Eclipse will restart, and whalah, you're finished!


    To run a quick test and make sure everything is working properly, go to File -> New -> Project. Expand Android, click on Android Project, and click Next.


    Now we'll have to fill in our project information. Because this is a test run, we'll call the project testrun. For the package name, we'll use And last but not least, the activity name will be test.


    Click Finish.

    Eclipse will crunch on that for a second, and open the project in the left pane. Expand the main tree to see the file structure of a default new project. The last thing we need to do before we run our test application is set up a run configuration. In the menu, go to Run -> Run Configurations...


    Double click on Android Application and it will create a new configuration. Give the configuration a name, and click browse for the project.


    Choose your project, click OK. Now click Apply, then Run.

    You'll notice the bottom pane switches over to Console. This will let you know what's going on with the emulator. After a few seconds, the emulator will start up.


    Note that the first run will take *much* longer than usual to start up, as it's setting up the Android OS while it starts up for the first time. Depending on the specs of your computer, it can take anywhere from a few minutes to over half an hour.

    After awhile, you'll arrive at the starting screen.


    Click on Menu to unlock the screen. Usually, you'll get a few errors as things start up and can't be started.


    I usually just click wait. In the console, you'll see it install, and then start up your application.



    And with that, it's time for you to dive into the code and start making your application.

  2. routhusanny

    routhusanny New Member

    thats a nice presentation by you for installing android on windows xp. It is very helpful to me. after setting the path, when i tried to start eclipse a error window flashed on the screen saying that " a java Runtime environment or jdk must be available inorder to run eclipse. No java virtal machine was found after searching the following locations c:\eclipse\jre\bin\javaw.exe javaw.exe in your currebt path". I tried changing paths, but i did not succeed. I have been using windows xp 2002 version sevice pack 2. Please tell me solution. Thanks in advance.
  3. Denis.Beurive

    Denis.Beurive Member


    Thank you very much for these explanations!

  4. kwty

    kwty Member

    hi ,
    when i add site it said no repository and i clicked ok but when i tried to expand the tree of the site it said again there is no repository and it didn't expanded so please tell me what i have to do.

  5. devolio

    devolio Well-Known Member

    Try changing the http to https and see if you have any better luck. It may just have been down for awhile.
  6. vinnie215

    vinnie215 New Member

    were do i get Eclipse from? thank you edit: evermind i found it lol
  7. noonehereyet

    noonehereyet No One... VIP Member

  8. jusutus

    jusutus Member

    Why do I keep getting

    [2009-03-15 15:39:32 - testrun] getFileType got errno=22 on '(null)'
    [2009-03-15 15:39:32 - testrun] ERROR: output file '(null)' exists but is not regular file
    [2009-03-15 15:39:33 - testrun] getFileType got errno=22 on '(null)'
    [2009-03-15 15:39:33 - testrun] ERROR: output file '(null)' exists but is not regular file

    after I've created a new project? I'm using Eclipse 3.4.2.
  9. FortKnox

    FortKnox Well-Known Member

    Thanks for the tutorial. Haven't tried it yet, but it looks very thorough. I'm still in the Developer 100 stage of learning how to develop for Android (I was a java developer by trade for 5 years, a lifetime ago). I'm very sorry if these questions have already been answered elsewhere, I just didn't find them, but if you could post the URL, many much thanks. Way more basic questions than you address:

    -do I need a separate piece of hardware than the basic T-Mobile G1 phone I already have (i.e. a "developer phone")?

    -so if I get the Android SDK (I already use Eclipse), is it possible to get my in-progress application onto my phone for testing without putting it out in the Market? Or is the emulator designed to eliminate that need?

    -what is the path to getting an application in the Market?

    Thanks for any useful answers!
  10. RozzaC

    RozzaC Well-Known Member

    To answer your questions...

    - I'm learning to develop for android and I'm getting along fine with just the normal G1 and the SDK emulator..

    - I think the emulator is meant to eliminate that need...although I doubt it's better than actually having a real phone to test it on...

    - something I don't know the answer to...I'm nowhere near creating a fully working app so I haven't bothered to look it up...but I'm assuming it would be through the Android Market website...(or maybe the Developers site)
  11. devolio

    devolio Well-Known Member

    To answer your 2nd and 3rd questions...

    Once you've got all the SDK stuff set up, you can pretty much plug in your phone, run your project, and Eclipse does the rest. If the phone is plugged in, it loads it up on your G1/ADP1, if not, it loads up in the emulator.

    As for the market, you'll have to sign up for a developer account ($25), you'll have to confirm your bank/google checkout connected account (using a small deposit, a-la-paypal/other payment services, assuming you want to sell your apps) and then you'll be able to post your applications to the market. Instead of explaining in boring text how it all works, I took a few screenshots for you.

    The main market menu. Lists all your submitted applications, the number of ratings, 'total' rating, total downloads and estimated installations with %, Price, and whether or not it's published. At the bottom right, you'll see the Upload application button...

    Upon clicking that, you'll be able to choose the application to upload (signed with non-debug keys, of course,) which language it's localized for, it's title and description, type and category, price...

    Whether or not to use copy protection (supposedly stops non-root users from being able to copy your application,) Which countries you want to release your app or game in, your contact information, and the agreements you've to agree to.

    That's about it. Develop your app, sign it for release, upload, and you're done. If you've got anymore questions, feel free to ask :)
    whbjr and Gryphin81 like this.
  12. renegadeandy

    renegadeandy Member

    omg - I am a very able Java developer - I had no idea the magic was SDK compatible with Java i.e you write Java code for the apps - that is outstanding - now I just need an idea for an app to develop!
  13. blackout

    blackout New Member

    Thanks a lot for the guide mate. Just got everything up and running and going to start coding.

    By the way, do you know of any good start up sites or guides?

    Thanks a lot
  14. Jacqueline

    Jacqueline Well-Known Member

    Thank you so much! I was having a bit of trouble figuring out what to download and how to hook it all together on my 64 bit Vista, but your guide worked a treat!

    Things changed slightly with the new version 7, yet I was able to figure out everything on the installation from your notes.

    I ran into a few problems with the project and found these fixes for them.

    Error starting project: "An SDK Target must be specified"

    I found this error is due to me not setting the SDK location preference in Window / Preferences / Android. Once set, I had three available: Android 1.1, Android 1.5, and Google APIs.

    Error running project:
    - no classfiles specified
    - Conversion to Dalvik format failed with error 1

    This is a weird one. I found I had to highlight the project and hit F5 to clear this error. The project has a red x on it until you do F5 once for some reason.

    Error 2 running project:
    Android AVD Error. No compatible targets were found. Do you wish to a add (sic) new Android Virtual Device?

    This gave me an option to create an Android Virtual Device, so I filled in the settings (below), clicked Create AVD, selected the one I just created, then clicked Finish.
    Name: Android-1.5-Emulator
    Target: Android 1.5 - 1.5
    Skin: Default (HVGA)

    Wow! Now I actually have an emulator up and running!!! I see Hello World! :) I never could have done it without your help. I really appreciate the time you took to put all this together. I hope the notes I added there will help anyone who runs across the troubles I did.
  15. G8D

    G8D Well-Known Member

    Using SDK r3 I am getting:
    [2009-09-13 20:21:30 - test] no classfiles specified
    [2009-09-13 20:21:30 - test] Conversion to Dalvik format failed with error 1

    Halp meh.
    Also.. anyone know a good place to learn Java?

    EDIT: Ok got it booting. Now, good Java tutorial resource?
  16. galt

    galt Well-Known Member

    I only see update 17, not update 10, which takes me to update 8 not 6, of the SDK

    I assume the later update is okay ?
    Or should I be concerned about Firefox compatability?
  17. Droid69

    Droid69 Member

    I'm getting the same crap. Yo! anyone gonna answer Galt?
  18. metter

    metter Active Member

    Just take the newest.
  19. RossLH

    RossLH Active Member

    I'm having a whole lot of trouble installing the ADT. No matter which method I try, it cant connect to the server.:(

    EDIT: Getting a 404 error in my browser. It must be down.

    EDIT: 3 days later, still down?? This is incredibly frustrating. Is anybody else having this problem?
  20. RossLH

    RossLH Active Member

    Double posting so maybe someone will shine some light on this problem.....

    Still getting nothing from or When I try to add the repository in Eclipse, it wont connect. If I try entering either address in my web browser, I get a 404. Do I have the address right? Is there somewhere else I can find the tools?

    I've been trying for a week now. I'd like to think I'm quite capable with Java/C++, and I really want to get started with developing, but Google is not making this easy for me.
  21. RossLH

    RossLH Active Member

    Alright, played around with this some more, and finally got it to work. If anyone else is having the same problem, here's what I did (and it really was as simple as unchecking ONE box:():

    Download the ADT Plugin .zip file. In the 'Add Site' dialogue, click archive, select the .zip file, and hit OK. Uncheck the box that reads "Contact all update sites during install to find required software". If you dont, it'll just try to connect to the same site that you couldn't connect to before, and much like I did for a week, you'll be running in circles. When it comes to adding SDK components, I also found I had to enable 'force download from http' in the settings.

    Regardless, it looks like everything should be up and running after I finish adding the SDK components. Thanks for the writeup! Despite a small road block, the writeup was very helpful.:eek:
  22. tsaunders

    tsaunders Well-Known Member

    Thank you! I was looking for this.
  23. flu13

    flu13 Well-Known Member

    It looks like the newest stuff in Eclipse for Android is very different than the steps outlined above. It's complaining about things that I don't have set up yet when I try to create an Android project. Anyone have an updated set of set-up steps?
  24. amit.savani

    amit.savani New Member


    I am not able to create new project as next button is disabled in "New Android Project" dialog in eclipse though mandatory values specified.

    I think I have not selected the target build as the list is empty. How this list is populated?

    Please suggest.
  25. Forest Marie

    Forest Marie Member

    Failed to fetch URL, reason: Server redirected too many times (20)

    Can anyone tell me how to get 'past' this????

    It's highly annoying ...

    I can hit that link directly but the Android SDK/ADVD Manager cannot???

    Please help - anyone ;)

Share This Page