E / art:向调试器发送回复失败:管道损坏,但应用程序仍在运行 [英] E/art﹕ Failed sending reply to debugger: Broken pipe, but application still runs

查看:1443
本文介绍了E / art:向调试器发送回复失败:管道损坏,但应用程序仍在运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行我的应用程序时,logcat中会出现许多行,但只有一个错误:

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

E / art:发送回调调试器失败:管道损坏

这是什么意思?我该如何解决?

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

推荐答案

解释错误:



Explaining the error:

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

什么是E / ART?

ART A ndroid - [R 未的Ť IME。这是Android手机上的字节码解释器。 E 只是表示 ERROR 的记录级别。

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

什么是发送回复调试器?

Android手机上的调试是使用 adb (Android调试桥)。 adb 进程在您的开发计算机(您的笔记本电脑或PC)上运行,守护程序在Android设备(即模拟器或手机)上运行。

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).

什么是损坏的管道?

您的开发机器和Android设备像客户端服务器一样进行通信,损坏的管道表示通信已变为无效。例如,客户端(Android设备)正在尝试向服务器发送回复(在开发机器上运行的adb进程),但服务器已经关闭了套接字。

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.

首先通过执行清理/重建来确保您的应用正确构建。

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

然后,如果您在真实手机上使用USB调试运行应用程序,那么您通常可以通过拔下USB电缆然后重新插入以重新建立客户端/服务器连接来解决问题。

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.

如果这不起作用,您可以断开USB连接线(如有必要,请停止模拟器)并关闭Android Studio。这通常足以阻止 adb 进程。然后,当您再次打开Android Studio时,它将重新启动并重新建立连接。

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.

如果这不起作用,您可以尝试使用说明手动停止adb服务器在这个问题。例如,您可以尝试打开命令提示符或终端,然后转到 sdk / platform-tools 目录并输入:

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

这篇关于E / art:向调试器发送回复失败:管道损坏,但应用程序仍在运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆