4

我刚开始开发一个简单的 hello world 应用程序,我收到了这个错误,我无法在 AVD 或任何设备上调试任何应用程序。我正在使用 Eclipse Juno 和 Windows 8。

[2012-11-11 10:57:37 - ddms] Can't bind to local 8610 for debugger
[2012-11-11 10:57:37 - ddmlib] An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
at com.android.ddmlib.Client.sendAndConsume(Client.java:575)
at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
at com.android.ddmlib.Client.requestAllocationStatus(Client.java:421)
at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:837)
at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:805)
at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:765)
at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:652)
at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)
at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:580)

[2012-11-11 10:58:41 - ddms] Can't bind to local 8602 for debugger
[2012-11-11 10:58:41 - ddms] Can't bind to local 8610 for debugger
[2012-11-11 10:58:41 - ddms] Can't bind to local 8602 for debugger

我检查了许多可用的解决方案,包括:禁用 Windows 防火墙/防病毒

在主机文件中添加一行“127.0.0.1 localhost”

检查是否没有另一个 Eclipse 实例在后台运行(我只有一个实例在运行)

重启亚行

重新创建 avd

重新启动eclipse,我的电脑也没有帮助

在 Window -> Preferences -> Android -> DDMS "base local debugger port" 中更改并检查 "use ADBHOST" 和 "127.0.0.1" 也没有帮助我。

使用 netstat -a 检查端口未在使用中

拜托,也许有人可以解决这个问题,以便调试器连接。

4

2 回答 2

3

安装 Windows 8 后我遇到了同样的问题。

安装 JRE 6 确实解决了这个问题,但是它确实可以工作一次,而无需这样做..

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jre-6u34-oth-JPR

于 2012-11-12T22:44:34.833 回答
2

好的,我花了几个小时才弄清楚:原来原因是 Java 7。我卸载了 Java 7 并安装了 Java 6,现在可以调试了!

于 2012-11-11T20:04:30.167 回答