Eclipse DDMS 在重新启动时不显示模拟器
我正在运行 Eclipse:Helios。问题就在这里。当我在编程时让 Android 模拟器运行大约 20 分钟时,如果我尝试安装并运行我的应用程序,我会在控制台中收到以下错误:
[2011-07-12 12:27:55 - DatePrinter] 无法安装 DatePrinter.apk 在设备“emulator-5554”上:连接被拒绝:连接
[2011-07-12 12:27:55 - DatePrinter] java.net.ConnectException: 连接被拒绝:连接
[2011-07-12 12:27:55 - DatePrinter] 启动已取消!
如果我关闭模拟器并再次运行该项目,则会启动一个新的模拟器,并且控制台显示模拟器正在启动,但应用程序不会安装,并且模拟器不会显示在 DDMS 中。
如果我转到终端并输入 adb devices
,我会收到此错误消息
ADB 服务器未确认
*启动守护进程失败*
错误无法连接到守护进程
我发现的唯一修复它的方法是关闭 eclipse,终止 adb.exe 进程并重新启动 eclipse。
有什么想法可能导致此错误/如何调试它吗?
编辑:通过 SDK 管理器启动模拟器也不会产生任何积极结果。
编辑 2:运行 adb Kill-server 和 adb start-server 会产生相同的消息“ADB Server did not ACK”,尽管它打印出 “守护进程未启动,现在在端口 5037 上启动它“
就在那之前。
I'm running Eclipse: Helios. Here's the issue. When I leave my Android Emulator running for about 20 minutes while I'm programming, if I try to install and run my application, I receive this error in the console:
[2011-07-12 12:27:55 - DatePrinter] Failed to install DatePrinter.apk
on device 'emulator-5554': Connection refused: connect[2011-07-12 12:27:55 - DatePrinter] java.net.ConnectException:
Connection refused: connect[2011-07-12 12:27:55 - DatePrinter] Launch canceled!
If I close the emulator and run the project again, a new emulator launches and the console shows the emulator starting but the app does not install and the emulator does not show up in DDMS.
If I go to the terminal and type in adb devices
, I get this error message
ADB Server didn't ACK
*failed to start daemon*
error cannot connect to daemon
The only way I can fix it that I've found is to close eclipse, kill the adb.exe process and restart eclipse.
Any ideas what could be causing this error/how to debug it?
Edit: Starting the emulator through SDK manager does not yield any positive results either.
Edit 2: Running adb kill-server and adb start-server yields the same message "ADB Server didn't ACK" although it prints a "daemon not started, starting it now on port 5037"
right before that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
虽然我没有遇到和你一样的问题。如果模拟器和 Eclipse 出现连接问题,我会使用以下方法:
在 Eclipse 的 DEVICES 窗口(DDMS 视角)下拉菜单(位于窗口的右上角)中,选择“重置 ADB”。
这解决了大部分连接问题,否则将需要重新启动。
Though I did not have the same problem as you did. In case of connectivity problems with emulator and Eclipse I use the following:
In the DEVICES window of Eclipse (DDMS perspective) drop down menu (in the upper right corner of the window) select "Reset ADB".
This solves most of connectivity problems, which otherwise will require restart.
尝试一下
检查adb路径是否已添加到环境变量中,否则尝试重新安装SDK本身。
Try this
Check whether adb path has been added to environment variable, otherwise try to re-install the SDK itself.
我也有同样的问题。在文件夹
C:/../android-sdk/platform-tools
中,以下命令不起作用。什么也没做,
结果出现了错误。
所以我用任务管理器杀死了adb进程并再次使用
adb start-server
。它有效。I had the same problem. In the folder
C:/../android-sdk/platform-tools
, the following commands didn't work.Did nothing, and
resulted in an error.
So I killed the adb process with the task manager and used
adb start-server
again. And it works.方法如下:
adb
并结束进程Here is a way to do it:
adb
and end the process检查您的防病毒程序控制对话框,例如 Norton Antivirus 和 ZoneAlarm 2010。
确保
有输入、出站和网络连接!
Check your Anti virus program control dialogs e.g Norton Antivirus and ZoneAlarm 2010.
Make sure that
have input and outbound and network connections!