views:

177

answers:

3

I'm an Android newbie trying to learn how to port one of my apps to the Android platform. I've been following this tutorial:

http://www.vogella.de/articles/Android/article.html#overview

I'm stuck unable to boot up the emulator :( When I tell it to start, it would just stick at the "Android" boot animation for hours on end. I searched online and found some pages talking about disabling the boot animation. I did so and tried again. There's no boot animation (just the word "Android" flashing), but it's still hours with no sign of booting. 'top' shows an app called 'emulator' using a lot of CPU.

Am I doing something wrong? My system is an AMD Athlon X2 dual-core QL-60, 1900 MHz with 3GB ram.

Thanks for any help you can offer.

A: 

what is your console output? is there any problems or issues?

there should be sys print like:

[2010-08-08 14:33:23 - 2dgraphics] ------------------------------
[2010-08-08 14:33:23 - 2dgraphics] Android Launch!
[2010-08-08 14:33:23 - 2dgraphics] adb is running normally.
....

mine takes 10-12 mins to start up

Andy Lin
Well, I was running it from within eclipse before, so there was no console to speak of. I just switched to running it from the console ("emulator -avd TestDroid -no-boot-anim"). For some reason, this actually booted up. I don't know why eclipse failed. :PThanks anyway!
Karen
Aargh. I thought I had it, since I was able to boot it by running it from the console. And I still am able to. But for some reason, eclipse doesn't recognize my console instance / can't talk to it. So it still tries to get me to start it. If I try to start it when I've got the emulator running, it says that something else is already using it and fails. If I kill off the emulator I started, I'm back to square one -- it won't start, and instead will just hang for hours on end.Argh. Any ideas?
Karen
did you try to right click on the project -> Run As -> Open Run Dialog ... -> click project -> click target tab -> find and select AVD you just started?
Andy Lin
i also noticed that my "installed packages" for eclipse plugin is more than what you had in your tutorial. i had Android SDK Tools etc. installed, for instance.the tutorial i followed is android's official one:http://developer.android.com/sdk/eclipse-adt.htmlhope this helps
Andy Lin
I figured out what to do. When I clicked Run, it said it couldn't find an instance to connect to and asked if I wanted to start a new one. Instead of clicking to start a new one, I found that if I cancelled, it brought up a different dialog to associate it with a running instance. Thanks everyone.I still wish I knew why it waits forever when it's started from eclipse, but at least now I have a workable solution.
Karen
Ooh, adb logcat has something interesting:D/AndroidRuntime( 225): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<D/AndroidRuntime( 225): CheckJNI is ONI/vm-printf( 225): Invalid -Xmx '-Xmx2147483647m', range is 2048KB to 1048576KBI/vm-printf( 225): I/vm-printf( 225): dalvikvm: [options] class [argument ...]I/vm-printf( 225): dalvikvm: [options] -jar file.jar [argument ...]I/vm-printf( 225): I/vm-printf( 225): The following standard options are recognized:(snip)I/vm-printf( 225): W/dalvikvm( 225): JNI_CreateJavaVM failed(snip)It loops like this ad inf. when stuck.
Karen
Well, for now, I think I'm going to call it solved (watch me curse my luck). Noting that obscene attempt to allocate gigs of memory (which failed), I think it's due to my vm.HeapSize parameter being too high. When looking up the stats for the Motorola Droid, I found the HeapSize listed as "unlimited", so I just typed a bunch of 9s into that field.I've changed it to instead be equal to the max ram of the Droid, and at least my first attempt at a boot was successful.
Karen
congratulations... Xmx2,147,483,647m... O_O that's PB...
Andy Lin
A: 

Answered; see comment above.

Karen
A: 

I don't have the most high end laptop (1.8ghz core duo 2 with 2GB ram and windows 7) but even so, I sorta expected it to boot by now. I've let it run for over 40 minutes and although there is cpu usage, it's just stuck on the loading animation. I wonder if setting the process priority higher would do it. I probably just need to NOT use windows ;) I'll post what I figure out when I get it.

Jason