E/art: Failed sending reply to debugger: Broken pipe, but application still runs

匿名 (未验证) 提交于 2019-12-03 01:23:02

问题:

When I run my application many lines appear in the logcat but only one error:

E/art: Failed sending reply to debugger: Broken pipe.

What does it mean? And how can I fix it?

回答1:

Explaining the error:

E/ART: Failed sending reply to debugger: Broken pipe. 

What is E/ART?

ART is the Android RunTime. This is the bytecode interpreter on your Android phone. The E simply indicates the logging level of ERROR.

What is "sending reply to debugger"?

Debugging on the Android phone is done using the adb (Android Debugging Bridge). The adb process runs on your dev machine (your laptop or PC) and a daemon runs on the Android device (i.e., the emulator or handset).

What is a broken pipe?

Your dev machine and the Android device communicate like a client server and a broken pipe means that the communication has become invalid. For instance, the client (the Android device) is trying to send a reply to the server (the adb process running on the dev machine) but the server has already closed the socket.

How to fix it

First make sure your app is building correctly by performing a clean/rebuild.

Then if you are running your app using USB debugging on a real phone then you can often fix the problem by unplugging the USB cable and then plugging it back in to reestablish the client/server connection.

If this doesn't work, you can disconnect the USB cable and (stop the emulator if necessary) and close Android Studio. This is often enough to stop the adb process. Then when you open Android Studio again it will restart and the connection will be reestablished.

If this doesn't work, you can try stopping the adb server manually using the instructions in this question. For instance, you can try opening command prompt or terminal and going to the sdk/platform-tools directory and typing:

adb kill-server adb start-server 


回答2:

You can do the following:

  • Kill emulator and Android Studio
  • Open Android Studio and "Rebuild" that basically deletes the build folder and recreates it.


回答3:

I had a breakpoint in a return statement, when I removed it everything ran as it should. So give that a try too (removing all breakpoints).



回答4:

killing the "adb" process helped me recover from this error. Just try restarting the adb.



回答5:

The Error comes because of not getting the actual data or class. Use Android Monitor with Log level Error and no Regex filter to check error. Hope you will get actual error.



回答6:

  1. Check the file name colors in res folder if name is color then replace with colors
  2. I think you need to move your color declaration out of strings.xml and put it inside of colors.xml

colors.xml

#ccff00


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!