Installation did not succeed.The application could not be installed: INSTALL_FAILED_USER_RESTRICTED

Posted edgargao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Installation did not succeed.The application could not be installed: INSTALL_FAILED_USER_RESTRICTED相关的知识,希望对你有一定的参考价值。

        使用android Studio调试小米真机时,突然提示如下错误:

Installation did not succeed.
The application could not be installed: INSTALL_FAILED_USER_RESTRICTED

        之前一直用的好好的,没出现这种情况。网上搜索一番,基本上都是说没有打开USB安装权限。进入开发者选项,发现USB安装是打开的,然后反复关闭和开启,还是不行。往下滑动页面时,发现了一个【选择调试应用】的选项,将该选项置为【无】,发现应用可以正常安装。

        如果还是不行,可能是AndroidManifest.xml文件中的android:taskAffinity属性设置不正确,字符中需要加"."。例如,如果直接用"com"就会报此错,用"com.xxx"就能正常安装。

以上是关于Installation did not succeed.The application could not be installed: INSTALL_FAILED_USER_RESTRICTED的主要内容,如果未能解决你的问题,请参考以下文章

Android studio初次运行出现Installation did not succeed. The application could not be installed

Android studio初次运行出现Installation did not succeed. The application could not be installed

Android studio初次运行出现Installation did not succeed. The application could not be installed

关于 flutter_boost 在manifest中注册BoostFlutterActivity报错:Installation did not succeed.

Session ‘app‘: Installation did not succeed. The application could not be installed: INSTALL_FAILED_

Installation did not succeed.The application could not be installed: INSTALL_FAILED_USER_RESTRICTED