未知失败(cmd:失败呼叫服务程序包:管道损坏(32)) [英] Unknown failure (cmd:Failure calling service package: Broken pipe (32))

查看:1058
本文介绍了未知失败(cmd:失败呼叫服务程序包:管道损坏(32))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Android Studio在Android设备上运行应用程序,否则运行正常,但是在这种情况下,某些数据已从手机中删除,而该过程尚未完成,Android Studio试图安装并运行该应用程序,该应用程序导致我的手机卡住了一段时间并重新启动.

I was trying to run my application on my Android device using Android Studio, it runs fine otherwise but in this case some data was being deleted from my mobile phone and while that process wasn't done yet, Android studio was trying to install and run the app which caused my phone to get stuck for a while and restart.

所以我想知道是否有一种方法可以获取错误的完整堆栈跟踪信息,这是否意味着我的应用程序可能没有正确正确地结构化,并在重要的过程?

So I would like to know if there is a way to get the full stack trace of the error and does this mean that my application is probably not properly structured and got killed in the middle of an important process?

谢谢.

这是我当时遇到的错误:

This is the error I got at that time:

安装失败,并显示消息无法完成会话:未知失败(cmd:失败呼叫服务程序包:管道损坏(32)).

Installation failed with message Failed to finalize session : Unknown failure (cmd:Failure calling service package: Broken pipe (32)).

是通过卸载现有的解决此问题的可能版本的apk(如果存在),然后重新安装.

It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.


PS :我不是在问如何解决此错误,因为我的应用程序正在运行,我想了解是什么原因引起的.


PS : I'm not asking about how to solve this error because my app runs, I want to understand what might have caused it.

推荐答案

仅作说明:

断管"错误的确切含义是什么?

这意味着当进程向管道或套接字请求输出时,被同行关闭了.

It means that when a process requests an output to pipe or socket, which was closed by peer.

因此,根据 Android Studio 中的错误,是 Grade Deamon 试图执行adb命令来安装最新版本的(推送)生成 .apk 文件(使用tcpip协议通过套接字写入应用程序包),但是adb与设备的连接丢失,因此Gradle无法执行命令.

So, according to error here in Android Studio is that Gradle Deamon was trying to execute an adb command to install (push) latest generate .apk file (writing application package through socket using tcpip protocol) but connection gets lost by adb to device so that Gradle failed to execute command.

有时,与设备的连接松动/不良会导致这种问题.

Sometimes, loose/poor connection to device causes this kind of issue.

(在某些情况下,更新的 incremental dex 不会写入设备,并且 .apk 由于 dex &使其发出警告,请删除旧版本以重新安装apk.)

(In some of the cases, updated incremental dex doesn't gets written to device, and .apk becomes corrupted due to outdated dex & so that it warns to reinstall apk by removing old one.)

现在,如果您无法从Android Studio"Logcat"窗口中获取 logcat ,那么您仍然可以在终端中使用此命令来获取错误报告/logcat

Now, if you failed to grab logcat from Android Studio 'Logcat' window then you can still get bug report/logcat using this command in terminal

adb bugreport 'path to store bug report(optional)'

或使用

adb logcat

查看设备日志

要获取详细或已过滤的日志:链接

For grabbing detailed or filtered log: link

这与您的查询无关:(这是否意味着我的应用程序可能结构不正确,并且在重要过程中被杀死了?)

因此,一旦您重新运行(重新安装)您的 .apk

So, everything will be perfectly fine once you re-run (reinstall) your .apk

这篇关于未知失败(cmd:失败呼叫服务程序包:管道损坏(32))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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