An established connection was aborted by the softw

2019-01-01 09:15发布

[2011-04-11 13:27:36 - 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:573)
    at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:349)
    at com.android.ddmlib.Client.requestAllocationStatus(Client.java:419)
    at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:840)
    at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:808)
    at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:767)
    at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:635)
    at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:42)
    at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:563)

标签: android
19条回答
无与为乐者.
2楼-- · 2019-01-01 09:32

I encountered this issue on my Windows 7 64-bit development machine when running Android Studio 2.1.x and Android Studio 2.2.x side-by-side.

I had deployed an application via the 2.2.x instance the previous day and had left that IDE running. The next day I deployed a different application from the 2.1.x IDE and this is when I encountered the issue.

Shutting down both IDEs and then restarting the 2.1.x IDE resolved the issue for me.

查看更多
萌妹纸的霸气范
3楼-- · 2019-01-01 09:34

Running Eclipse Luna and using WifiADB app on my phone I started getting this error when Running my app from Eclipse. Oddly, in Indigo (I installed Luna last night) it was working fine.

The problem for me was I had the phone connected to the PC to charge it, and even when running a .bat script to kill ADB it appeared that a second instance was started when Run. Plugging the phone into the monitor to charge when debugging over wifi solved it. I need to debug on wifi sometimes to test my app stopping/starting on power state change.

Of course it reasonable to assume (highly likely) I've just not set Luna up the same.

查看更多
人气声优
4楼-- · 2019-01-01 09:35
  1. Close Eclipse
  2. Open Task Manager and kill adb.exe
  3. Start Eclipse It should work.
查看更多
查无此人
5楼-- · 2019-01-01 09:36

Checkout there might be two instances of Eclipse are pointing to same Android SDK...just keep one instance of Eclipse and try again...that's why you are getting Exception as "established connection was aborted by the software in your host machine"...go in details of android adb(Android Debug Bridge) you will get it...

查看更多
君临天下
6楼-- · 2019-01-01 09:36

I was having this problem. Things I tried:

  1. Restart Eclipse
  2. Restart Eclipse & Kill adb as mentioned here.
  3. Restart Machine & Open Eclipse

This is what worked for me

  1. Powered off (pulled plug) my android device, Restart Machine, Power on android device.

Hope this helps someone!

查看更多
姐姐魅力值爆表
7楼-- · 2019-01-01 09:38

If you develop in multiple IDE's or other programs that connect to AVD you should try closing them too.

Netbeans also can cause conflicts with eclipse if you set it up for NBAndroid.

查看更多
登录 后发表回答