I trying to get Google's Hello World app for Android working in Eclipse. The first time the AVD indeed displays "Hello World", but when I click it away and restart the application fr开发者_StackOverflow中文版om Eclipse, nothing happens - however long I wait.
Killing adb.exe in the process list does not help.
I actually see a stacktrace when just launching the AVD itself. Unfortunately, launching an AVD apparently takes 3 command prompts which all disappear before you can read what is outut to them.
I think the problem you are having, is that the application is just starting off from where it left off, because the application hasn't changed.
If you change the code, save it (, revert it back again if you want, save it), then try running the application from Eclipse again.
The reason for this is that Eclipse will only install the new APK to the emulator when the code has changed, to save time. If the new APK isn't installed, then typically the original application will just bring itself to the foreground.
If you don't want to change the code, an alternative is to access the DDMS (Window->Open Perspective->DDMS) and open your emulator instance on the left side, choose the name of your application (designated by package name) and click on the red stop button to kill the process. This way, your application should start up as normal, without reverting to its standby instance.
If you are having Logcat issues, for some people running this in the command line helps:
adb kill-server
adb devices
精彩评论