Android SDK: Hello World won't run !
This is a very very beginner question regarding Android Development
I am trying to create and run the Hello world example from the Android SDK website, but I can't see anything appearing on the screen. It appears to me that Eclipse just hangs at this point:
[2010-11-05 09:55:47 - HelloAndroid] ------------------------------
[2010-11-05 09:55:47 - HelloAndroid] Android Launch!
[2010-11-05 09:55:47 - HelloAndroid] adb is running normally.
[2010-11-05 09:55:47 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-11-05 09:55:48 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'AVD2'
[2010-11-05 09:55:48 - HelloAndroid] Launching a new emulator with Virtual Device 'AVD2'
[2010-11-05 09:55:51 - HelloAndroid] New emulator found: emulator-5554
[2010-11-05 09:55:51 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2010-11-05 09:57:10 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2010-11-05 09:57:10 - HelloAndroid] Device API version is 8 (Android 2.2)
[2010-11-05 09:57:10 - HelloAndroid] HOME is up on device 'emulator-5554'
[2010-11-05 09:57:10 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2010-1开发者_开发技巧1-05 09:57:12 - HelloAndroid] Installing HelloAndroid.apk...
[2010-11-05 09:59:33 - HelloAndroid] Success!
[2010-11-05 09:59:33 - HelloAndroid] Starting activity com.example.helloandroid.HelloAndroid on device emulator-5554
So it says "Starting activity ..." but nothing ever starts and it's already been more than 30 mins. What could be wrong??
Thanks !
Oh...hmm..I did the following:
- Restarted Eclipse
- Run the application again
- After waiting for like 10 mins, I clicked on the "menu" button on the Android simulator
and it worked !! :)
Before you can launch the emulator, you must create an Android Virtual Device (AVD). An AVD defines the system image and device settings used by the emulator.
To create an AVD, use the "android" tool provided in the Android SDK. Open a command prompt or terminal, navigate to the tools/ directory in the SDK package and execute:
android create avd --target 2 --name my_avd
Similar thing happened with me too. But here I got emulator but displaying nothing. But it was memory problem. I got it after a while.
In your case the only fault seen is "not specifying api level" try by doing the same :)
精彩评论