我刚刚开始开发一个简单的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实例运行(我只有一个实例正在运行)
重新启动adb
重新创建avd
重启eclipse,我的电脑也没帮忙
在窗口中更改 - >偏好 - > Android - > DDMS“基本本地调试器端口”并检查“使用ADBHOST”和“127.0.0.1”也没有帮助我。
使用netstat -a检查端口是否未使用
拜托,也许有人可以解决这个疯狂问题,以便调试人员能够连接。
答案 0 :(得分:3)
自安装Windows 8以来,我遇到了同样的问题。
安装JRE 6确实解决了这个问题但它确实工作了一次而不需要这个......
答案 1 :(得分:2)
好的,我花了几个小时来搞清楚: 事实证明原因是Java 7.我卸载了Java 7并安装了Java 6并且现在调试工作了!