在更新到Android Studio 2后,当我试图运行我的应用程序并选择一个模拟器时,我等待模拟器启动,它突然被杀死。我可以看到模拟器进程几分钟,但从来没有GUI。在Android studio中,我得到了错误

android studio Error while waiting for the device: The emulator process for AVD was killed

即使我在Android Studio之外运行模拟器也会发生这种情况。我试用了Android 6和基于Android 4.4的模拟器。 在Windows 7 x64 PC上运行。类似于另一个StackOverflow帖子被关闭。我尝试了各种ram、VM堆和分辨率设置。


当前回答

简单解决方案2021

进入AVD管理器 找到您要使用的模拟器,然后单击向下箭头 选择“显示在磁盘上”选项 删除所有以.lock结尾的文件 再次运行模拟器,在此之后将初始化

其他回答

对我来说,这是我电脑剩余空间的问题,删除不必要的文件解决了这个问题。原因是不同的情况下,你应该看到事件选项卡,其中详细的事件日志显示。

我在运行Android API 30时遇到了这个问题。最后,我不得不将Android Emulator升级到30.1.5(在此之前是30.1.2)。

可能是安装问题或某些包/插件没有正确安装。 重新安装android studio。这对我很有效。

我以前也遇到过这种情况。现在应该通过升级到Android Studio 4.1.1来解决

请确保你所有这些勾选SDK工具

谷歌播放Intel x86 Atom System Image Android模拟器 Android SDK平台工具&构建工具

重新启动Android Studio。这似乎有用

你可以通过从命令行运行模拟器来获得错误消息的详细信息,例如:

C:\WINDOWS\system32>C:\Users\foo\AppData\Local\Android\Sdk\emulator\emulator -netdelay none -netspeed full -writable-system -avd emulator_foo
emulator: Android emulator version 30.6.5.0 (build_id 7324830) (CL:N/A)
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is undefined

或者通过Android Studio IDE菜单帮助->显示登录资源管理器->打开idea.log文件->再次运行avd模拟器,查看最后几行更新的错误日志。