首页 > 解决方案 > Android emulator - error while loading state for instance 0x0 of device 'goldfish_pipe'

问题描述

I updated some android studio components 2 days ago and everything messed up. Now I cant use android emulator since it exits immediately the moment it gets lunched.

I already tried the following:

  1. Delete all my virtual devices and created new ones - didn't work.
  2. Wipe Emulator data - didn't work.
  3. Tried to lunch emulator manually in AVD - didn't work
  4. Launch emulator with the option Cold boot now. - Emulator displayed this message Cold boot: requested by the user and exit.
  5. Uninstall Android Studio and deleted whole SDK folder and downloaded everything new - didn't work may be bacause the problem is within latest release.
  6. Tried to downgrade Emulator manually! I asked it here - I downloaded the previous release and deleted everything in sdk\emulator and put files there, Deleted all virtual devices and create new ones. Pressed run. this message pops up when emulator start Cold boot different AVD Configuration and then it exits again. This is may be I didn't downgrade all emulator related tools, I don't know how!. And sometimes different message pops up saying Resetting for cold boot: emulation engine failed and exits.

None of these worked and I am out of ideas.

Here are logs get printed before emulator flash disappearance.

16:00 Emulator: C:\Users\Nux\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'

16:00 Emulator: deleteSnapshot: for default_boot

16:00 Emulator: qemu: unsupported keyboard cmd=0x84

16:00 Emulator: Process finished with exit code 0

Screenshot of emulator before disappearance enter image description here

SDK Tools screenshot enter image description here

Edit Several issues have been submitted already:

  1. https://issuetracker.google.com/issues/132481542
  2. https://issuetracker.google.com/issues/132834989
  3. https://issuetracker.google.com/issues/131854864

标签: androidandroid-emulator

解决方案


此问题已在HAXM 7.4.1中修复,因此请确保您使用的是最新的 HAXM。在此处查看最新版本

旧答案

此问题的临时解决方案是将cpu.ncore的数量从4减少到12。转到avd并找到您的虚拟设备并在里面编辑config.ini然后将ncore=4更改为ncore=2

我的虚拟设备的 config.ini 路径是 C:\Users\Nux\.android\avd\Pixel_2_API_28.avd\config.ini

您也可以从AVD manager转到此路径。单击您选择的设备的下拉菜单,然后单击在磁盘上显示

它对我有用。来源https://issuetracker.google.com/issues/132481542

注意:模拟器可能很慢。希望这个问题在下一次更新中得到解决。


推荐阅读