运行app时提示pm uninstall com.example.lida.myapplication unk

Android 码拜 8年前 (2016-05-06) 1150次浏览
本人的环境:centos 6.7 android studio 1.4
建立一个示例程序,运行时,弹出提示窗口
Installation failed with message null.
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,然后run区域显示文字:
Uploading file
local path: /home/lida/AndroidStudioProjects/MyApplication7/app/build/outputs/apk/app-debug.apk
remote path: /data/local/tmp/com.example.lida.myapplication
Installing com.example.lida.myapplication
DEVICE SHELL COMMAND: pm install -r “/data/local/tmp/com.example.lida.myapplication”
Error: Could not access the Package Manager.  Is the system running?
DEVICE SHELL COMMAND: pm uninstall com.example.lida.myapplication
Unkonw failure
解决方案

40

貌似是模拟器没启动完成就运行应用导致的;等模拟器启动完成再运行应用。
http://stackoverflow.com/questions/15524185/could-not-access-the-package-manager-is-the-system-running-while-installing-and

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明运行app时提示pm uninstall com.example.lida.myapplication unk
喜欢 (0)
[1034331897@qq.com]
分享 (0)