安卓应用安装: Unknown failure (Failure - not installed for 0)

标签 android adb

应用程序在模拟器上运行良好,但我无法在我的设备(小米 Mi4)上启动应用程序。起初我用这样的文字播种对话:

Installation failed with message Failed to establish session.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

但在我同意之后 - 我在日志中看到这条消息:

Launching app
$ adb install-multiple -r <....>
$ adb shell pm uninstall com.example.app.debug
Unknown failure (Failure - not installed for 0)
Error while Installing APKs

我已多次重启设备并将其插入/拔出计算机,但没有任何帮助。

最佳答案

对于 Redmi 和 Mi 设备,请关闭 MIUI 优化并重新启动您的手机。

设置 > 开发者选项 > MIUI 优化

关于安卓应用安装: Unknown failure (Failure - not installed for 0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43077518/

相关文章:

java - 如何使用服务器分析两个Android设备之间的数据?

android - float 操作按钮未正确显示

android - 协议(protocol)错误(无法读取状态): Undefined error: 0

android - 使用 adb 连接 WIFI

java - 使用okhttp上传文件

android - 使用 twitter4j 的 Twitter 集成问题

javascript - 如何在原生移动应用中记录用户操作?

android - 如何在 Android 模拟器中对 SD 卡内存进行快照?

安卓:m​​yLocationOverlay.runOnFirstFix 太慢

android - 日志滚动得太快