在更新到Android Studio 2020.3.1金丝雀15后,当我试图运行模拟器时,它会被这个错误杀死:

AVD Pixel_4_API_30的模拟器进程已终止。

它在以前的版本(4.1.3)中工作正常,但现在安装新版本后,它显示相同的错误。


在类似的情况下,我尝试了一些建议的解决方案;然而,它仍然不工作。

我删除了我的模拟器(也清除了目录:/.android/avd/),并再次创建了一个新的模拟器 我将HAXM安装程序更新到7.6.5版本 我试着用较低的api运行模拟器,但是…


错误图片:


当前回答

由于这个问题花了我不少时间来解决,我想在OSX上分享我的解决方案。说实话,在我的情况下,问题是我之前使用的Android SDK没有Android Studio,因此环境变量没有正确配置。

检查idea.log(帮助>显示登录查找器)我意识到这些错误细节:

PANIC: Cannot find AVD system path. Please define  ANDROID_SDK_ROOT

我迅速地将环境变量添加到我的.zshrc (preferences >…> Android SDK),在我的情况下:

export ANDROID_SDK_ROOT=/Users/felixgeissler/Library/Android/sdk

但到目前为止,问题仍然存在:

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/Users/felixgeissler/Library/Android/sdk]! 

在那之后,我意识到我在我的.zshrc中也定义了ANDROID_HOME变量。删除此条目以某种方式解决了这个问题!我假设删除的变量干扰了SDK根。

其他回答

我无法启动API_30设备。

我必须从https://github.com/intel/haxm安装最新的硬件加速器版本(HAXM v7.7.0)

Then

要解决这类问题,通常你没有一些文件,你需要从谷歌下载并粘贴。我也面临着同样的问题。但是在谷歌上花了很多时间后,我终于得到了解决方案。

步骤如下:-

Create virtual device using AVD Manager start the emulator if it is showing your emulator has terminated Then go to ("C:\Users\YourUserName\AppData\Local\Google\AndroidStudio2020.3\log\idea.log") check the issue by scroll down(on bottom you can check) If you are getting the same issue Then go to C:\Windows\System32 directory, search here for file called vulkan-1-999-0-0-0.dll If file is already in directory, then just rename the file into "vulkan-1.dll" else download the file from this link you will have zip file, just extract and paste the vulkan-1-999-0-0-0.dll file and perform the step 8.

打开“编辑此AVD”。 在“模拟器性能”部分中,将图形类型更改为其他类型(例如,Software - GLES 1.1)。

我有一个旧显卡,这是在我的情况下工作。

Everything Fine. Good Work. Just make a little change. If you have 2 different pixel types appearing on Virtual Device section you have to delete any one of the pixel emulator which you do not prefer for your project. Delete it by clicking drop down arrow > Delete. It'll work for you the way it did for me. If you already have 1 pixel emulator, I might be wrong in telling you that the problem is you need SUFFICIENT SPACE where your ADVs generated OR you need to upgrade the HAXM installer to the latest --v

在我的例子中,当我试图启动第二个虚拟设备(VD)时发生了这种情况。我能够解决这个问题,简单地,关闭当前运行的VD。一旦我这样做了,我就可以运行多个dvd。