我刚开始开发一个简单的 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 检查端口未在使用中
拜托,也许有人可以解决这个问题,以便调试器连接。