Android And Me - androidandme.com

How to install Android SDK and play with Android 2.0 in the emulator

By Justin Shapcott on Oct 27 72

| More
How to install Android SDK and play with Android 2.0 in the emulator

Google has released the Android 2.0 SDK as of October 27th, 2009. We know how eager everyone has been to get their hands on Android 2.0, so we have decided to write up instructions so that anyone may download and install the SDK, then create and run an emulator instance.

Note, the emulator is not intended to duplicate any particular device, so treat this more as a look at some of the core new features of Android 2.0 than an emulation of any current or future device. Also, things that require hardware features are not available in the emulator. No multi-touch in here guys (unless you manage to get two mice to work?).

Enough of the talk, let’s get down to business.

1)      Download appropriate file for your system from http://developer.android.com/sdk/index.html

2)      Extract to desired location

3)      Run “SDK Setup.exe” (or the equivalent for your system)

Launch sdksetup.ext

Launch sdksetup.ext

a.       If you receive an error message stating “Failed to fetch url…” then you will have to force the Setup program to use http in lieu of https.

Got this error? Follow the steps.

Got this error? Follow the steps.

i.      Close the “Refresh Sources” window

ii.      Cancel the “Choose Packages to Install” window

iii.      Select “Settings” from the left side of the “Android SDK and AVD Manager” window

iv.      Check the box labeled “Force https://… sources to be fetched using http://…”

v.      Click “Save and Apply”

vi.      Close and restart the SDK Setup program

4)      Choose the packages that you wish install

Select only the packages you need.

Select only the packages you need.

a.       If you are only interested in trying out the Android 2.0 Emulator

i.      Reject everything except “SDK Platform Android 2.0. API 5, revision 1” by selecting each item then selecting the Reject option

b.      If you plan to develop Android applications and Games, you may wish to Accept All

c.       Click “Install Selected”

5)      Allow the selected packages to download and install then close the “Installing Archives” window

6)      Create a new Android Virtual Device (AVD)

These are the settings to emulate the Moto Droid.

These are the settings to emulate the Moto Droid.

a.       Select “Virtual Devices” from the left side of the “Android SDK and AVD Manager” window

i.      Click “New”

ii.      Enter a Name

iii.      Choose a Target

iv.      Enter a size for the emulated SD Card

v.      Choose a Skin

1.      To emulate current hardware such as the G1, MyTouch 3G, Hero, etc…

a.       Leave the default value

2.      To emulate the Motorola Droid

a.       Choose WVGA 854

3.      To emulate other devices

a.       Choose anything else

vi.      Click “Create AVD”

7)      Start your newly created Virtual Device

A successfully created AVD.

A successfully created AVD.

a.       Choose the Virtual Device from the list

b.      Click “Start…”

c.       Click “Launch”

Just click launch.

Just click launch.

8)      Allow copious time for Emulator to start up

First startup will take a few minutes.

First startup will take a few minutes.

9)      Enjoy!

Android 2.0

Android 2.0

About The Author

Subscribe

Justin Shapcott

Justin is the founder of and lead developer at nEx.Software.

72 Comments

  1. Thumb up Thumb down +2

    On my to do list for tonight. Thanks Justin!

    reply?
  2. Thumb up Thumb down +1

    are there instructions for the mac? This unfortunately does not help us out at all…

    reply?
  3. Thumb up Thumb down +1

    Please forgive me, I made the assumption that Google also provided a similar installer for Mac. According to the Mac SDK download you start the SDK Manager by running /tools/android program. I do not have a Mac so cannot tell if there is a similar GUIDE to the SDK Manager. If any has a Mac and can provide those instructions, we would greatly appreciate it.

    reply?
  4. Thumb up Thumb down +1

    awesome! it runs really slow on my computer and for some reason it has a normal keyboard but the text prediction is in chinese, odd

    but still i’m excited to try everything out, go android!

    reply?
    • Thumb up Thumb down 0

      For me the text prediction was by default in chinese too. Did you manage to switch this to English?
      Using Settings -> Keyboard and Language I was able to switch it by removing the chinese and japanese keyboards, but after closing the emulator and restarting it, text prediction reverted back to chinese.

      reply?
  5. Thumb up Thumb down -1

    Anybody else have very slow downloads with the SDK updater. It says its going 5 KiB/s and going to take 250 min!!!!

    reply?
    • Thumb up Thumb down 0

      No, it’s really fast here with around 9 kB/sec and 115 minutes left…

      reply?
      • Thumb up Thumb down 0

        I’m getting 37kb/s and about 37 mins remaining. And I have DSL! plus my laptop is connected wirelessly with 4 bars of strength on a 802.11G connection, I don’t know how but whatever! lol

        reply?
        • Thumb up Thumb down 0

          I’m getting 126 KiB/s 8min. I’m using the wifi tether and connecting through my droid. Verizon is a pretty good network.

          reply?
  6. Thumb up Thumb down 0

    For those new to the Emulator. You can “rotate” the screen by pressing Shift + F12. That way you can play/test in landscape mode.

    reply?
  7. Thumb up Thumb down 0

    How do I change the text input from Japanese to English US?

    reply?
    • Thumb up Thumb down 0

      Frank.. Go to settings, then go down to language & keyboard click it, then unselect the japanese keyboards. Hope that helped!

      reply?
  8. Thumb up Thumb down 0

    Thanks for the tip, Justin. I’m going to play around with it right now! :]

    reply?
  9. Thumb up Thumb down 0

    Instructions for Mac and Linux are similar but you need to start ./android from the tools folder.

    Side note, settings in Android SDK and AVD Manager while running Ubuntu wont stick, as you can check the box labeled “Force https://… sources to be fetched using http://…” all you want but you can not “Save and Apply” it just sits there. There are reports of some people having the same issue.

    As per Google Dev:
    It looks like it fails somehow to create the file containing the
    settings, but I don’t know why (it works fine here).

    The file is ~/.android/androidtool.cfg

    try to create it manually and add one line to it:
    sdkman.force.http=true

    we’ll try to figure out why it fails.

    Xav

    Xavier Ducrohet
    Android SDK Tech Lead
    Google Inc.
    http://groups.google.com/group/android-developers/browse_thread/thread/63a44163a8d07cd9

    reply?
    • Thumb up Thumb down -1

      Thanks Bob for the details regarding Mac and Linux installation.

      reply?
    • Thumb up Thumb down +1

      I found a way around this. I clicked the Save & Apply..then press enter on the keyboard….after that it went through.

      reply?
      • Thumb up Thumb down 0

        Pressing Enter on the keyboard worked for me as well. Manually editing ~/.android/androidtool.cfg did not. Thanks for the tip :)

        reply?
        • Thumb up Thumb down 0

          For me worked both ways. It looks like there is a bug that you need to press Enter on buttons. This issue happens at the package installation too…

          reply?
  10. Thumb up Thumb down 0

    Thanks for the great post! Does anyone know a way to make this Landscape mode?

    reply?
    • Thumb up Thumb down +1

      From several comments up…

      For those new to the Emulator. You can “rotate” the screen by pressing Shift + F12. That way you can play/test in landscape mode.

      Or 7 on number pad.

      reply?
  11. Thumb up Thumb down -1

    In my case I see only the screen and no skin around it… any clues why this happens? Also the screen for the Droid phone looks really long and thin… Anyone have ideas of the correct settings to simulate the phone?

    What are the options for Skin to simulate to scale the Droid phone?
    Skin: WVGA854 480×854
    Desity: ?
    And scale display to real device settings?
    Screen size: 3.7 (in)?
    Monitor dpi: ??
    thanks!
    :)

    reply?
  12. Thumb up Thumb down 0

    Guys, does the emulator use Bridged or NAT-ed networking when loaded on my computer? I’d like to test setup networked Exchange ActiveSync to my Exchange Server. Also, can someone point out where I can configure a client certificate, and VPN connection using L2TP? Thanks!

    reply?
  13. Thumb up Thumb down 0

    I had an issue with Ubuntu 9.10 and mouse button clicks in eclipse not sticking (had to use keys). Apparently its an eclipse issue. A link to information and workaround is here. I wonder if that is what you are experiencing with your link issue not sticking.

    https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/442078

    I am having a problem however with getting AVD to reasonably run. I tried creating the exact same AVD as in this post and I still have the same problem. I am going through the simple hello world app to verify my setup. However the AVD is running extremely slow. Then it will run hello world and I’ll get an error message in a box:

    “Sorry!

    Application Email (in process com.android.email) is not responding”
    With an option to Force close or Wait.

    Sometimes I’ll get:

    “Application Messaging (in process com.android.mms) is not responding”

    reply?
  14. Thumb up Thumb down 0

    FYI
    Despite try a number of times with different install paths each time, I had an issue when installing using the package manager,

    “Installing SDK Platform Android 2.0, API 5, revision 1 Failed to rename directory …”

    similar to the one posted on the issue tracker here
    http://code.google.com/p/android/issues/detail?id=4410#c0

    I disabled norton antivirus and the install went fine.

    Thanks for the straight forward tutorial, wasnt quite sure about upgrading from the 1.5 sdk

    Mark

    reply?
  15. Thumb up Thumb down 0

    It’s definitely antivirus. Had the same problem until I shut off Kaspersky.

    There’s a thread about it: http://groups.google.com/group/android-developers/browse_thread/thread/78be72a0cb5d40f4/8dfe6541c3ebfc25.

    reply?
  16. Thumb up Thumb down 0

    I tried installing the SDK Setup.exe on Windows 7 (x86_64) but it complains about the ANDROID_SWT environment variable. I already set it to point to the x86_64 swt.jar but it refuses to work.

    Any ideas?

    Thanks

    reply?
  17. Thumb up Thumb down 0

    No matter what I do I keep getting the ““Installing SDK Platform Android 2.0, API 5, revision 1 Failed to rename directory …”” error as well. I am running XP pro and AVG free edition which you cannot disable.

    Oddly enough, this worked just fine on Windows 7 with AVG Free edition.

    I would love to know how I can get this to install on my work PC!

    reply?
    • Thumb up Thumb down 0

      I wonder if you’ll still check back and read this, anyways i was having the same problem on my computer running Vista and AVG free

      What i ended up doing was going to the folder that it mentions at the end of that “Failed to rename directory…” (the folder was called PlatformPackage.new01) and going to its properties then unchecking the “read only” box

      I don’t know if you tried that or if you were actually having a different problem but it said it installed and seems to be working fine

      reply?
  18. Thumb up Thumb down 0

    Thank you. Very nice guide

    reply?
  19. Thumb up Thumb down +2

    When I try to run SDK Setup.exe, something flashes on my screen for a split second and nothing else happens. I disabled my anti-virus protection before running it. Did anyone else run into this?

    reply?
    • Thumb up Thumb down 0

      I had the same problem until I installed the latest Java. Now I can’t get an emulator to start./launch.

      I keep getting:

      emulator: ERROR: unknown virtual device name: ‘SecondAVD’
      emulator: could not find virtual device named ‘SecondAVD’

      reply?
  20. Thumb up Thumb down 0

    I should be more specific…I’m running on Win XP SP3.

    reply?
  21. Thumb up Thumb down 0

    ok i have never been able to get this or previous versions to work.. i would click on setup and the screen would dissapear after a second.. what am i not doing or doing wrong?

    reply?
    • Thumb up Thumb down 0

      I had same problem. The reason was that I had multiple JVM’s installed on my machine. JVM v1.4.2 is not enough to run the setup. I installed new Java on my computer and removed from path system variable paths to old JVMs.

      reply?
      • Thumb up Thumb down 0

        Thank you! I was also seeing the quick blank console window when trying to execute the setup installer. I have a new install of Windows 7, and didn’t have Java installed. Now that I have the latest Java installed, the setup is working.

        reply?
    • Thumb up Thumb down 0

      Kris, were you able to get it running? If so, what worked. I am having the same problem.

      Thanks

      reply?
      • Thumb up Thumb down 0

        yea, I finally figured it out. I played around with it for awhile but I dont think it was worth all that hassle

        reply?
  22. Thumb up Thumb down +2

    @ Kris & David
    I was having this same issue. It turned out that my unzip util didn’t create the /platforms and the /add-ons directory where I unzipped the sdk. Make sure these folders exist otherwise you can’t start the sdk setup.exe

    reply?
    • Thumb up Thumb down -1

      Hey Kyle!
      Thanks for the tip. I used a different extractor and viola, there were the missing files.

      Thanks

      reply?
  23. Thumb up Thumb down 0

    @kyle there not so how would We go about doing that?

    reply?
  24. Thumb up Thumb down 0

    just create empty dirs with those names

    reply?
  25. Thumb up Thumb down 0

    Is there anyway i can get this on my G1 or Hero??

    reply?
  26. Thumb up Thumb down 0

    i know its still in development stages, but will 2.0 take away the heroes beautiful 8 screens, and also get rid of that horrible square box. Just doesnt take my fancy, and no offense to people that like it but from a guy who has the Hero, its not something im used to. Cant wait to here a reply. x

    reply?
  27. Thumb up Thumb down 0

    Thanks, I was having the screen flash problem as well but fixed it with the Java fix.

    It runs great on my laptop and I am going to install it on my tablet pc later so I can get the full “touch” experience :)

    Thanks again.

    reply?
  28. Thumb up Thumb down 0

    Awesome

    reply?
  29. Thumb up Thumb down 0

    is that work on windows 7 ultimate 32bit? i tire to do this……!please help me.

    reply?
  30. Thumb up Thumb down +1

    when i try to run the properly set up emulator on my vista 32 bit computer i get this message.
    emulator: ERROR: unknown virtual device name: ‘Android.2′
    emulator: could not find virtual device named ‘Android.2′
    any help?

    reply?
    • Thumb up Thumb down 0

      I’m getting this too on Windows 7 home premium with today’s updates, 32bit. I’ve rebooted… I try different virtual setups with no success. I have Java 6 Update 18 installed.

      reply?
  31. Thumb up Thumb down 0

    Is it not possible to develop applications without downloading 1.1 , 1.5 and 1.6 SDK.
    Cant we not use SDK 2.0 to develop apps and games?

    reply?
  32. Thumb up Thumb down 0

    Hi all,
    I’m new user to android platform i have HTC Tattoo(Android 1.6).
    how can i update my phone to Android 2.0, I downloaded Android SDK but its just an Virtual platform to view Android 2.0 or should i config my phone to this SDK software to install Android 2.0 i dont have any idea about kindly help…..

    reply?
  33. Thumb up Thumb down 0

    “I’m getting an Application Settings (in process com.android.settings) is not responding.” error message. What should I do about this?

    reply?
  34. Thumb up Thumb down 0

    I’m getting an Application Settings is not responding too… any idea?!?

    reply?
  35. Thumb up Thumb down 0

    wanna kno it supports which kind of os.. am using linux n xp.. is it work on above those..

    reply?
  36. Thumb up Thumb down 0

    I setup the Android 2.0 target, when start the AVD, it just show a small ANDROID text on the left black screen and a keyboard on the right screen.
    after around 5 minutes, show bigger graphic ANDROID but nothing else even wait for a very long time. Any idea what was wrong? Thanks!

    reply?
  37. Thumb up Thumb down 0

    thanks a lot dude, it was really helpfull…. keep it up thanks again

    reply?
  38. Thumb up Thumb down 0

    I am having a problem with my emulator being too big for the screen. I chose the Droid one and deleted the ones I created several times but it keeps coming up too big for the screen.

    reply?
  39. Thumb up Thumb down 0

    i can not get past SDK Setup.exe tried everything i coul think of running it as admin. redownloading the SDK kit when i click the SDK Setup.exe just get a quick flash then its gone and nothing im running XP sp3 anyideas on what else it could be to get it up and running the right way

    reply?
  40. Thumb up Thumb down 0

    HEY! Thank you very much! i really need this ! you just saved my life !

    reply?
  41. Thumb up Thumb down 0

    Hi Everybody,

    Install the jvm first,I too had the same problem may be it needs to run swt.jar file updating the SDK.

    Am I right or wrong?

    reply?
  42. Thumb up Thumb down 0

    Hi I am new to android developement , i followed all the steps given here , can we control where the avd file is saved ,actually in my PC i have two user ids to log on , all the avd’s is create are saved in the documents folder for the adminstrator account and so that i can’t use them in my projects , i don’t have previlages to acces admin account , so is there a way around ?

    Plz help me

    Thanks :)

    reply?
  43. Thumb up Thumb down 0

    Hi All, i had solved the prob , i used the android.bat file on tools folder for creating further AVDS now its working

    reply?
  44. Thumb up Thumb down 0

    Its very helpful. Thanks alot

    reply?
  45. Thumb up Thumb down 0

    This is one of the greatest tutorial.

    reply?
  46. Thumb up Thumb down 0

    nice info gan

    reply?
  47. Thumb up Thumb down 0

    nice guide! my first step in developing my very own droid apps. :)

    reply?
  48. Thumb up Thumb down 0

    keep brining up the sdk but when it loads it says error loading prefrences then the sdk comes up and just stays with the black screen to the right the word android got bigger but nothing after that

    reply?

Leave a comment

Android And Me RSS Widget Android Network Awards