Android 模拟器快照错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10556725/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:09:38  来源:igfitidea点击:

Android Emulator snapshot error

androideclipseandroid-emulator

提问by user1165694

When launching my application in eclipse 3.7.0 I receive an error...

在 eclipse 3.7.0 中启动我的应用程序时,我收到一个错误...

Emulator] emulator: ERROR: Unable to load Vm from snapshot. The snapshot has been saved for a different hardware configuration.

Emulator] 模拟器:错误:无法从快照加载 Vm。快照已保存用于不同的硬件配置。

I have ran this application numersous times with out error but now this error displays. I have checked my AVD Manager and my platform and API Level are correct.

我已经无数次运行这个应用程序没有错误,但现在这个错误显示。我已经检查了我的 AVD 管理器,我的平台和 API 级别是正确的。

采纳答案by user1165694

resolved issue by:

通过以下方式解决问题:

  1. going to project and selecting Clean
  2. going to Window>AVD Manager>Delete and create a new AVD
  3. Relaunch application, emulator will take a few minutes to load.
  1. 去投影并选择清洁
  2. 转到窗口> AVD 管理器> 删除并创建一个新的 AVD
  3. 重新启动应用程序,模拟器将需要几分钟才能加载。

回答by Chilledrat

The problem isn't with your app, it is with the saved AVD snapshot. The AVD configuration has been edited since you last ran it successfully. Even changing skin/display resolution will produce this error. You could either:

问题不在于您的应用程序,而在于保存的 AVD 快照。自从您上次成功运行后,AVD 配置已被编辑。即使更改皮肤/显示分辨率也会产生此错误。你可以:

  1. Change the AVD configuration back to how it was originally.
  2. Edit the AVD to disable the Snapshot. or
  3. When you next start the AVD, uncheck the Launch with snapshot, but keep Save snapshotchecked. This way the snapshot will be ignored at start-up, but overwritten when you exit. You will then be able to use snapshot for subsequent runs as before.
  1. 将 AVD 配置改回原来的样子。
  2. 编辑 AVD 以禁用快照。或者
  3. 下次启动 AVD 时,取消选中Launch with snapshot,但保持选中Save snapshot。这样快照将在启动时被忽略,但在您退出时被覆盖。然后,您将能够像以前一样将快照用于后续运行。

回答by Nacho Coloma

To remove the list of stored snapshots in your system:

要删除系统中存储的快照列表:

rm ~/.android/avd/[your_avd_name]/snapshots.img*

回答by Molly

I had the same issue as Timmmm, nothing would resolve it.

我和 Timmmm 有同样的问题,没有什么能解决它。

Through the command line emulator.exe -avd avdname -snapshot default-boot gives me that same error. But I also noticed that it launches from the GUI just fine.

通过命令行 emulator.exe -avd avdname -snapshot default-boot 给了我同样的错误。但我也注意到它从 GUI 启动就好了。

I went into the C:\users\uname\.android\avd\The_avd\and deleted the snapshots.img.default-bootsnapshot and the snapshots iso file.

我进入C:\users\uname\.android\avd\The_avd\并删除了snapshots.img.default-boot快照和快照iso文件。

It's easier than recreating the machine, but deletes your snapshot(s), and then you can use it again like normal.

这比重新创建机器更容易,但会删除您的快照,然后您可以像往常一样再次使用它。

回答by K_Anas

Go to window-> Android Virtual Device Manager, choose your Virtual Device and Disable the Launch from snapshot and keep save to snapshot option and click Launch.

转到窗口-> Android 虚拟设备管理器,选择您的虚拟设备并禁用从快照启动并保留保存到快照选项,然后单击启动。

回答by Pratik Butani

Maybe try to disable the hardware snapshot in the Android Virtual Device Manager? It should be installed wherever you installed the android SDK.

也许尝试在Android 虚拟设备管理器中禁用硬件快照?它应该安装在您安装 android SDK 的任何地方。

enter link description here

在此处输入链接描述

回答by 2Dee

In my case, it seems due to the fact that I closed my AVD between 2 launches of the same app, I got this error message at the second launch.

就我而言,似乎是由于我在同一应用程序的两次启动之间关闭了我的 AVD,我在第二次启动时收到了此错误消息。

I didn't need to "Clean" the project, just launched the AVD manually using the AVD manager, waited for it to boot and launched the app again once booting was completed. Worked for me.

我不需要“清理”项目,只需使用 AVD 管理器手动启动 AVD,等待它启动并在启动完成后再次启动应用程序。为我工作。

回答by Quartz

You may have been trying to start the emulator from AVD before this, and from the command line now. Most AVDs use arm instruction sets, so you may have to try something like:

在此之前,您可能一直在尝试从 AVD 启动模拟器,现在从命令行启动。大多数 AVD 使用 arm 指令集,因此您可能必须尝试以下操作:

emulator64-arm -avd <your avd label> -no-snapshot-load -no-snapshot-save

回答by japanjot singh suri

finally i got the solution follow these steps:

1)open avd manager
2)select the avd which is givin this err-"ERROR: Unable to load VM from snapshot. The snapshot has been saved for a different hardware configuration."
3)click on start
4)now uncheck these two options-"launch from snapshot" and "save snapshot"
5)now check "wipe user data"
6)start the avd now
7)as soon as the"ANDROID" is displayed, close the avd
8)now open avd manager again
9)uncheck "wipe user data"
10)check on these two options-"launch from snapshot" and "save snapshot"
11)now start the avd, it would be easily loaded from snapshots without errors

最后我得到了解决方案,请按照以下步骤操作:

1)打开 avd 管理器
2)选择出现此错误的 avd -“错误:无法从快照加载 VM。快照已保存用于不同的硬件配置。”
3)单击开始
4)现在取消选中这两个选项 - “从快照启动”和“保存快照”
5)现在选中“擦除用户数据”
6)立即启动 avd
7)一旦显示“ANDROID”,关闭 avd
8)现在再次打开 avd 管理器
9)取消选中“擦除用户数据”
10)选中这两个选项 - “从快照启动”和“保存快照”
11)现在启动 avd,它将很容易从快照加载没有错误

回答by JosephL

This is a known issue. Hopefully it will be fixed in the next release of the Android SDK but who knows? I think the solution from user1165694is easier than the suggested solution on the issue.

这是一个已知问题。希望它会在下一个 Android SDK 版本中修复,但谁知道呢?我认为user1165694的解决方案比关于该问题的建议解决方案更容易。