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

查看:24
本文介绍了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?

推荐答案

解释错误:

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

什么是 E/ART?

ARTAndroid Rstrong>unT 时间.这是 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.

如果这不起作用,您可以尝试使用 这个问题.例如,您可以尝试打开命令提示符或终端并转到 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天全站免登陆