Android 在设备失败时安装 [INSTALL_CANCELED_BY_USER] [英] Android Install on Device Failure [INSTALL_CANCELED_BY_USER]
问题描述
我正在使用 Android Studio 连接以在我的小米 Redmi Note 3G 设备中运行应用程序.我的设备已在 选择设备对话框 中找到,但我不断收到 [INSTALL_CANCELED_BY_USER]
错误:
I'm using Android Studio to connect to run app in my Xiaomi Redmi Note 3G device. My device is already found in the Choose Device Dialog, but I keep getting the [INSTALL_CANCELED_BY_USER]
error :
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]
我尝试在网上寻找解决方案,但没有提到 Failure [INSTALL_CANCELED_BY_USER]
错误.
I tried looking for solutions online, but there's no mention of Failure [INSTALL_CANCELED_BY_USER]
error.
推荐答案
我的小米手机更新到 MIUI 8 后发生了这种情况.我花了几个小时才弄明白!
Happens to my Xiaomi phone after updated it to MIUI 8. Took me hours to figure it out!
如果您也是受害者,请检查以下内容:
Check the followings if you're a victim too:
- 转到设置 -> 权限 -> 通过 USB 安装:取消选中您的应用(如果已列出).
- 转到设置 -> 其他设置 -> 隐私:检查未知来源选项.
- 最后转到设置 -> 其他设置 -> 开发者选项:选中通过 USB 安装选项.
- Go to Settings -> Permissions -> Install via USB: Uncheck your App if it's listed.
- Go to Settings -> Additional Settings -> Privacy: Check the Unknown Sources option.
- Finally go to Settings -> Additional Settings -> Developer options: Check the Install via USB option.
更新(MIUI 8):
需要登录 MI 帐户才能启用通过 USB 安装选项.
Signin in to MI account is required to enable Install via USB option.
更新 2
对于某些设备(例如 Redmi),您可能需要关闭 MIUI 优化并重新启动手机.
For some devices (e.g. Redmi) you might need to turn off MIUI Optimization and reboot your phone.
设置>附加设置 >开发者选项 >MIUI优化
附言除非必要,否则不要更新 MIUI!
P.S. don't update MIUI unless necessary!
愿受害者得救
这篇关于Android 在设备失败时安装 [INSTALL_CANCELED_BY_USER]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!