what caused IOException and Broken pipe

后端 未结 13 1245
慢半拍i
慢半拍i 2020-12-29 18:15

My AVD is of API 15, I don\'t know why but the following message keeps coming up whenever I run an application on emulator. It doesn\'t seem to have caused any trouble excep

相关标签:
13条回答
  • 2020-12-29 18:31

    This happened to me when I had both monitor and Eclipse ADT open. Try closing all Android related stuff and then do a adb kill-server && sleep 5 && adb devices and then start your tool (Eclipse/Ant/AS) again.

    0 讨论(0)
  • 2020-12-29 18:33

    In my case, I remove the the .android in my home directory. That's Ok.

    0 讨论(0)
  • 2020-12-29 18:38

    A "Broken pipe" exception occurs when a socket connection is closed by the client on the other side. Most of the time this is nothing to worry about.

    0 讨论(0)
  • 2020-12-29 18:40

    I was using both Android Studio and DDMS. Closing DDMS fixed the problem for me.

    Restarting Android Studio had no impact.

    0 讨论(0)
  • 2020-12-29 18:41

    The most common reason I've had for a "broken pipe" is that one machine (of a pair communicating via socket) has shut down its end of the socket before communication was complete. About half of those were because the program communicating on that socket had terminated.

    If the program sending bytes sends them out and immediately shuts down the socket or terminates itself, it is possible for the socket to cease functioning before the bytes have been transmitted and read.

    Try putting pauses anywhere you are shutting down the socket and before you allow the program to terminate to see if that helps.

    FYI: "pipe" and "socket" are terms that get used interchangeably sometimes.

    0 讨论(0)
  • 2020-12-29 18:43

    Old question, but still relevant and I didn't see any other answer with this information:

    For me it happened when another Eclipse was running at the same time, with DDMS competing over the same socket as the eclipse trying to connect to the Android device.

    Solution was to close the other Eclipse. Hope it helps someone.

    Update: Probably a better solution is to edit the DDMS port of the other eclipse to something you don't use. So it's out of the race.

    0 讨论(0)
提交回复
热议问题