Android Studio创建项目初始化运行失败

Android Studio创建项目初始化运行失败

07/23 17:04:46: Launching 'app' on Pixel 2 API 30.
Installation did not succeed.
The application could not be installed.

List of apks:
[0] 'E:\AndroidStudioProjects\MyApplication\app\build\intermediates\apk\debug\app-debug.apk'
Installation failed due to: ''cmd package install-create -r -t --user current --full --dont-kill -S 5823619' returns error 'Unknown failure: cmd: Can't find service: package''
Retry
Failed to launch an application on all devices

工具:

Android studio

问题:

创建一个新项目未改动任何代码,想要测试运行一下,就出现这种报错,求帮助

img

截图:

img

这个是模拟器的问题,不是项目问题
AVD Manager -> 选中的你的模拟器 -> 右键 -> Cold Boot Now
实在不行就使用真机或者换个第三方模拟器

项目是没问题的模拟器的话,试试:AVD Manager -> 选中的你的模拟器 -> 右键 -> Cold Boot Now
我这边之前遇到过是可以的

具体也不知道是什么原因,建议你可以真机运行试试看

img


你的虚拟机版本是30,是不是你项目gradle中设置的目标版本太高了?