【发布时间】:2017-06-25 23:26:30
【问题描述】:
我正在尝试创建我的第一个 android 应用程序。为此,我使用 Android Studio 2.2.3。我用单一的活动创建了一个简单的应用程序,它什么都不做,只是空屏幕,没有别的。
我正在魅族 MX6 上开发,我打开了下一个选项:
- 安全应用程序 -> USB 安装监视器
- 设置 -> 指纹和安全 -> 未知来源
- 设置->辅助功能->开发者选项->USB调试
还配置了udev规则。
当我按下运行按钮时,我看到这条消息:
Installation failed with message INSTALL_FAILED_USER_RESTRICTED.
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?
按下 OK 后,此日志将出现在控制台输出中:
$ adb push /home/***/dev/android/HelloAndroid/app/build/outputs/apk/app-debug.apk /data/local/tmp/com.android.hello.helloandroid
$ adb shell pm install -r "/data/local/tmp/com.android.hello.helloandroid"
pkg: /data/local/tmp/com.android.hello.helloandroid
Failure [INSTALL_FAILED_USER_RESTRICTED]
$ adb shell pm uninstall com.android.hello.helloandroid
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APK
谁能解释一下如何解决这个问题?
【问题讨论】:
-
好像有人遇到过同样的问题:stackoverflow.com/questions/40534271/… 并且有解决方案。