Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Newly installed Eclipse and Android SDK. Can't get emulator to work. Hangs on clock screen

I'm brand new to development.

I've installed Eclipse and Andoid SDK. But, I can't get emulator to work. I've tried the sample notepad code and Hello Android tutorial code. Each time I try to run either app it just hangs on clock screen (screen also says charging 50% and has a padlock).

Here is the console info for the sample notepad app.

[2011-03-11 15:27:17 - samplenotpad] ------------------------------
[2011-03-11 15:27:17 - samplenotpad] Android Launch!
[2011-03-11 15:27:17 - samplenotpad] adb is running normally.
[2011-03-11 15:27:17 - samplenotpad] Performing com.example.android.notepad.NotesList activity launch
[2011-03-11 15:27:17 - samplenotpad] Automatic Target Mode: launching new emulator with compatible AVD 'myEmulator3'
[2011-03-11 15:27:17 - samplenotpad] Launching a new emulator with Virtual Device 'myEmulator3'
[2011-03-11 15:27:19 - samplenotpad] New emulator found: emulator-5556
[2011-03-11 15:27:19 - samplenotpad] Waiting for HOME ('android.process.acore') to be launched...
[2011-03-11 15:27:33 - Emulator] emulator: emulator window was out of view and was recentred
[2011-03-11 15:27:33 - Emulator] 
[2011-03-11 15:28:17 - samplenotpad] HOME is up on device 'emulator-5556'
[2011-03-11 15:28:17 - samplenotpad] Uploading samplenotpad.apk onto device 'emulator-5556'
[2011-03-11 15:28:17 - samplenotpad] Installing samplenotpad.apk...
[2011-03-11 15:29:09 - samplenotpad] Success!
[2011-03-11 15:29:10 - samplenotpad] Starting activity com.example.android.notepad.NotesList on device emulator-5556

Then nothing...


I've tried the following steps already from this page, but still not working.

http://developer.android.com/guide/appendix/faq/troubleshooting.html#eclipse

Eclipse isn't talking to the emulator

When communication doesn't seem to be happening between Eclipse and the emulator, symptoms can include: nothing happening when you press run, the emulator hanging waiting for a debugger to connect, or errors that Eclipse reports about not being able to find the emulator or shell. By far the most common symptom is that when you press run, the emulator starts (or is already running), but the application doesn't start.

You may find any of these steps will fix the problem and with practice you probably can figure out which one you need to do for your particular issue, but to start with, the safest option is to run through all of them in order:

  • Quit the emulator if it is running
  • Check that any emulator processes are killed (sometimes they can hang, use ps on unix or mac, or task manager in the process view on windows).
  • Quit Eclipse From the command line, type: adb kill-server, start Eclipse and try again

Wondering if I need to try uninstalling and reinstalling some component?

I'm running Windows 7.

Any help much appreciated - in as plain english language as possible please :-)

like image 231
Alice Avatar asked Mar 11 '11 02:03

Alice


2 Answers

Are you at the unlock screen? Did you unlock the "phone" You need to drag the unlock button with your mouse by clicking on the button and then dragging to the right

like image 115
ralph Avatar answered Dec 03 '22 12:12

ralph


Since you are new to development pls try the following step

  1. Restart Eclipse
  2. Open the Android SDK and AVD Manager
  3. Delete your existing AVD
  4. Recreate the AVD with your set of paramaters (i.e. name, android version etc)
  5. Go back to your code and run the program again.

You should now be able to run the sample programs again..

Hope it helps

Bob

like image 38
Bob Avatar answered Dec 03 '22 11:12

Bob