简体   繁体   English

当我运行项目时会发生这种错误

[英]when I run project this kind of error occurs

LogCat shows this error, LogCat 显示此错误,

[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.如何更改 adb 连接超时。 it's default is 5000 ms.它的默认值为 5000 毫秒。

    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" .将以上内容复制到记事本中并将其保存为"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.此外,正如 HERO 所建议的那样,请增加您的超时时间。

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我注意到,在许多情况下,重新启动 eclipse 或电话/模拟器或两者的组合已证明在纠正 adb 断开连接方面是有效的......我个人在断开连接后从未有过重启 adb 的运气

Try closing eclipse and reopening.尝试关闭 eclipse 并重新打开。 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.我在使用以太网连接时遇到了 ADB(Android 调试桥)的问题。 The USB to ethernet adapter was quite old, using a newer one with a MOSCHIP chipset solved the problem. USB 到以太网适配器已经很老了,使用带有 MOSCHIP 芯片组的较新的适配器解决了这个问题。

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拉杰什

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM