这是一个可怕的错误

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?

当试图在我的红米4 MIUI 8.5.4.0中运行apk时

启用OEM解锁

解决方案尝试

MIUI优化关闭 打开USB调试 通过打开USB验证应用程序

注意:当通过USB打开安装时,会弹出提示“设备暂时受限”


当前回答

如果你仍然面临INSTALL_FAILED_USER_RESTRICTED问题,试试这个 这个方法适合我在miui 13中使用 设置->权限->通过USB安装->取消你的应用程序

其他回答

什么对我有用

goto设置->附加设置->开发人员选项->撤销USB调试授权。 在任务管理器中关闭adb.exe (CTRL + SHIFT + ESCAPE) 重新安装,观察弹出窗口(接受RSA签名并安装) 现在一切都好了

从开发人员选项中关闭MIUI优化 安装app 把它打开。

下次安装这个apk(和它的更新)不会再给出这个错误。

小米缪。

选项-权限-通过USB安装(在开发人员选项中不是同一项!) 然后取消选中已禁用的应用程序

If above answer didn't work for you as it didn't work for me on my Xiaomi Mi5.I tried to figure out the Core reason behind it and solve it. In MIUI, in order to change "Install via USB" option, you must be connected to the internet and signed in your Mi account. Due to some reason, requests from out of the China servers are getting rejected, so I connected to one open China VPN and tried again to enable 'Install via USB' and I got success. For detailed solution and VPN details, see this useful Youtube video: https://youtu.be/MeKUJlD-Ke4

如何修复安装失败的用户限制失败在Android工作室- 小米红米Note 4X(100%适用于我) 设置=>附加设置=>开发人员选项

模拟SD卡优化= OFF USB调试=打开 通过USB安装= ON USB调试(安全设置)= ON 通过USB = ON验证应用程序 强制关闭应用程序=打开 打开MIUI优化=关闭