遇到了这个奇怪的错误
Installation failed with message Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Install canceled by user.
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?
当尝试在我的红米手机中运行 apk
时 MIUI 8.5.4.0
OEM 解锁已启用
解决方案尝试
- MIUI 优化关闭
- USB 调试已开启
- 通过 USB 验证应用已开启
注意:打开通过 USB 安装时会弹出一个提示 设备暂时受限
最佳答案
MIUI 9 及更高版本的步骤:
设置 -> 附加设置 -> 开发者选项 ->
关闭“MIUI优化”并重启
开启“USB调试”
开启“通过 USB 安装”
MTP(媒体传输协议(protocol))是默认模式。
在某些情况下甚至可以在 MTP 中使用将 USB 配置设置为充电
关于android - INSTALL_FAILED_USER_RESTRICTED : android studio using redmi 4 device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47239251/