得到了这个怪异的错误
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?
Run Code Online (Sandbox Code Playgroud)
当我试图在我的redmi 4中运行apk时 MIUI 8.5.4.0
启用OEM解锁
解决方案
注意:在通过USB打开安装时弹出一个说明设备暂时受限制
我正在使用Android Studio连接到我的小米Redmi Note 3G设备中运行应用程序.我的设备已在" 选择设备"对话框中找到,但我一直收到[INSTALL_CANCELED_BY_USER]错误消息:
Waiting for device.
Target device: xiaomi-hm_note_1w-SSE6Y97PFYQCRK45
Uploading file
local path: C:\Users\Anthony\AndroidStudioProjects\UASProject\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.si.UASPROJECT
Installing com.si.UASPROJECT
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.si.UASPROJECT"
pkg: /data/local/tmp/com.si.UASPROJECT
Failure [INSTALL_CANCELED_BY_USER]
Run Code Online (Sandbox Code Playgroud)
我尝试在线寻找解决方案,但没有提到Failure [INSTALL_CANCELED_BY_USER]错误.