Android Studio 启动编译,在启动模拟器时突然报错提示:

Installation failed with message 'cmd package install-create -r -t -S 2293359' returns error 'Unknown failure: cmd: Can't find service: package'.
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?  ”

整理下了解决方法:在“Android Virtual Device Manager”模拟驱动管理器中,再新建一个模拟器,启动编译时,选择新建的模拟器运行,就可以正常编译运行程序。原因可能是模拟器补丁包无法下载或冲突所导致。


这个问题在网上有很多遇到,包括英文社区也不少遇到这个提问'cmd package install-create -r -t -S xxxxx'   只是后面这个‘-s 的编号不同’,有说:关闭模拟器,然后在Bulid菜单下“Clear Project”清除项目,但无法解决。