when I run project this kind of error occurs
LogCat shows 开发者_运维百科this error,
[2011-05-05 08:57:54 - test] Failed to install test.apk on device 'emulator-5554': timeout
[2011-05-05 08:57:54 - test] Launch canceled!
How about changing adb connection timeout. it's default is 5000 ms.
Window -> Preferences -> Android -> DDMS -> ADB connection timeout to 10000 ms
c:
cd\
cd C:\android\platform-tools
adb kill-server
adb start-server
copy the above in a notepad and save it as "ADB_restart.bat". Run it when you get this error. Will probably fix the error. This also fixes lot of connection problems with devices and emulators.
Also as suggested by HERO, Do increase your Timeout.
I have noticed that a combination of either restarting eclipse, or the phone/emulator, or both has proven effective in rectifying adb disconnects in many cases... I've never had luck with restarting adb after a disconnect personally
Try closing eclipse and reopening. You might get some warning when it opens something along of the lines of a marker not found but generally everything is still ok.
I had this problem with ADB (Android Debug Bridge) using an ethernet connection. The USB to ethernet adapter was quite old, using a newer one with a MOSCHIP chipset solved the problem.
Dont worry too much about it ... just look at the active emulators when this repeats again... It mostly is the Emulator not being registered as something that is active. Close the already running emulator and then restart it. you must be just fine...
Rajesh
精彩评论