views:

487

answers:

1

I got the Hello, Android program to work after reading the tutorials from Google's developer website, but it takes SO long for the AVD to load up! Plus, in the console section in the bottom part of Eclipse, two of the lines were written in red, which I'm guessing is bad. It takes around a minute for the AVD to start running the actual program. This is what the console printout looks like:

[2010-08-06 12:32:38 - HelloAndroid] ------------------------------ [2010-08-06 12:32:38 - HelloAndroid] Android Launch! [2010-08-06 12:32:38 - HelloAndroid] adb is running normally. [2010-08-06 12:32:38 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch [2010-08-06 12:32:38 - HelloAndroid] Automatic Target Mode: Preferred AVD 'my_avd' is not available. Launching new emulator. [2010-08-06 12:32:38 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd' [2010-08-06 12:32:54 - HelloAndroid] New emulator found: emulator-5554 [2010-08-06 12:32:54 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched... [2010-08-06 12:34:05 - HelloAndroid] WARNING: Application does not specify an API level requirement! [2010-08-06 12:34:05 - HelloAndroid] Device API version is 8 (Android 2.2) [2010-08-06 12:34:05 - HelloAndroid] HOME is up on device 'emulator-5554' [2010-08-06 12:34:05 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554' [2010-08-06 12:34:05 - HelloAndroid] Installing HelloAndroid.apk... [2010-08-06 12:35:07 - HelloAndroid] Success! [2010-08-06 12:35:07 - HelloAndroid] Starting activity com.example.helloandroid.HelloAndroid on device [2010-08-06 12:35:11 - HelloAndroid] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.helloandroid/.HelloAndroid }

Now that I looked at the times, I started to run the program at 12:32, and it finally had my program on the screen at 12:35, so thats 3 minutes. Is this a normal amount of time I have to wait? If it isn't, any suggestions on how to make it faster? Thanks in advances for anyone who makes this easier for me to understand!

+1  A: 

Well the AVD is a totally different architecture from say a Windows PC. Windows usually runs on 32bit or 64bit. On Intel or AMD processors. The Instructions for the processor are written in x86. The way binary and machine code works/runs is different to each arcitechture. The android package that you have uploaded onto the device has to be compiled on the AVD architechture. The Emulator has to emaulate ARM architechture so the instruction sent to the CPU is different. This takes time to compile this code. Hope this answers it. Any questions?

LukeF95
So it's normal for the emulator to take that long? The laptop I have now is a 2 year old Compaq Presario C700, and it only has 1 GB of RAM. Do you think getting a new laptop with 2/4 GB would help? I'm going to get a new one anyway within the next few months, and knowing if having 4 GB instead of 2 will make a difference would definitely help out.
Pat
Well if your application is going to need more than the RAM you have it's best upgrading the RAM.A good thing would be to find a better laptop with a faster processor.What Kind of Application are you trying to develop?
LukeF95
I'm not trying to develop any specific application; I just want to know how to make basic Android apps because I'm going to get a new Android-OS phone really soon (after having the same phone for the last 5 years). I brought up the question about RAM because Eclipse was getting really slow, so when I opened up task manager I found out it was using 180-ish MB. And under the performance tab, it said that out of the 1013 MB of total physical memory, I had 0 free.
Pat
Well that sounds like you need a RAM upgrade. That would be a reason for it taking a while to load. And anyway it is normal for AVD to take its time to load applications.
LukeF95
Ok, thanks for clearing things up. I'm going to wait until I get a new laptop to have more RAM - I don't want to delay the inevitable. Also, this has Windows Vista, which I can't wait to stop using.
Pat