E/art﹕ Failed sending reply to debugger: Broken pipe, but application still runs
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?
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
You can do the following:
- Kill emulator and Android Studio
- Open Android Studio and "Rebuild" that basically deletes the build folder and recreates it.
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).
killing the "adb" process helped me recover from this error. Just try restarting the adb.
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.
I had this error when I made a mistake with a object type (img response) in my model class, while I tried to get response from my Url in Android. And when I fixed it the error gone
- Check the file name colors in res folder if name is color then replace with colors
- I think you need to move your color declaration out of strings.xml and put it inside of colors.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="myColor">#ccff00</color> </resources>