Eclipse DDMS 在重新启动时不显示模拟器

发布于 2024-11-19 19:30:52 字数 858 浏览 4 评论 0原文

我正在运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

太阳哥哥 2024-11-26 19:30:52

虽然我没有遇到和你一样的问题。如果模拟器和 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.

遮云壑 2024-11-26 19:30:52

尝试一下

adb kill-server

adb start-server

检查adb路径是否已添加到环境变量中,否则尝试重新安装SDK本身。

Try this

adb kill-server

adb start-server

Check whether adb path has been added to environment variable, otherwise try to re-install the SDK itself.

梦太阳 2024-11-26 19:30:52

我也有同样的问题。在文件夹 C:/../android-sdk/platform-tools 中,以下命令不起作用。

adb kill-server

什么也没做,

adb start-server

结果出现了错误。

所以我用任务管理器杀死了adb进程并再次使用adb start-server。它有效。

I had the same problem. In the folder C:/../android-sdk/platform-tools, the following commands didn't work.

adb kill-server

Did nothing, and

adb start-server

resulted in an error.

So I killed the adb process with the task manager and used adb start-server again. And it works.

北凤男飞 2024-11-26 19:30:52

方法如下:

  1. 打开任务管理器
  2. 选择 adb 并结束进程
  3. 转到 Eclipse 并重置 adb
  4. 运行您的应用程序

Here is a way to do it:

  1. Open Task Manager
  2. Select adb and end the process
  3. Go to Eclipse and reset adb
  4. Run your app
硬不硬你别怂 2024-11-26 19:30:52

检查您的防病毒程序控制对话框,例如 Norton Antivirus 和 ZoneAlarm 2010。

确保

eclipse.exe
emulator.exe
emulator-arm.exe

有输入、出站和网络连接!

Check your Anti virus program control dialogs e.g Norton Antivirus and ZoneAlarm 2010.

Make sure that

eclipse.exe
emulator.exe
emulator-arm.exe

have input and outbound and network connections!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文