简体   繁体   English

Android 模拟器 - 默认不保存状态

[英]Android emulator - Don't save state by default

In the latest update for Android studio, the emulator has started saving snapshots of the current state of the device by default and going back to that snapshot when reopened, which is not the behavior that I want.在 Android Studio 的最新更新中,模拟器默认开始保存设备当前状态的快照,并在重新打开时返回该快照,这不是我想要的行为。 How can I disable that and go back to the previous behavior, where it just closes and resets the emulator?我怎样才能禁用它并回到之前的行为,它只是关闭并重置模拟器?

UI after hitting the X button to close点击 X 按钮关闭后的 UI

在此处输入图片说明

Android Studio 3.0.1 , with Emulator version 27.0.2 and HAXM 6.2.1 Android Studio 3.0.1 ,模拟器版本 27.0.2 和 HAXM 6.2.1

disable that and go back to the previous behavior禁用它并返回到以前的行为

Unselect quick boot as shown below取消选择快速启动如下图

This is default behaviour from update of Android Studio 3.0这是Android Studio 3.0更新的默认行为

Please unselect quick boot if you don't want to save state and select cold boot如果您不想保存状态,请取消选择快速启动并选择冷启动

Check quick boot emulator in details详细检查快速启动模拟器

Steps步骤

1> Choose device like phone - pixel 2 1> 选择手机等设备 - 像素 2

2> select your system image 2> 选择您的系统映像

3> Verify configuration - show advance setting - emulator performance check cold boot to disable 3>验证配置-显示高级设置-仿真器性能检查冷启动禁用

4> Finish 4> 完成

在此处输入图片说明

OR

you can also change it from你也可以改变它

Emulator --> More --> Settings --> Change quick-boot state --> Save模拟器 --> 更多 --> 设置 --> 更改快速启动状态 --> 保存

在此处输入图片说明

Updated thanks to @James KO Steps are very similar:更新感谢@James KO 步骤非常相似:

... (on the right panel) -> Snapshots tap -> Settings (top tab on detail view) -> Auto-save current state to Quickboot dropdown ... (在右侧面板上)-> 快照点击-> 设置(详细信息视图的顶部选项卡)-> Auto-save current state to Quickboot下拉列表

更新图像

end update结束更新

In the latest version of the Android Studio (I am running 3.1.2 ), it is no longer in the AVD Manager settings.在最新版本的 Android Studio(我正在运行3.1.2 )中,它不再位于 AVD 管理器设置中。 I found it under Extended Controls on emulator itself.我在模拟器本身的扩展控件下找到了它。

  1. Start emulator启动模拟器
  2. Click three dots (...) on emulator panel单击模拟器面板上的三个点 (...) 在此处输入图片说明
  3. Go to Settings -> General, towards the bottom "Save quick-boot state on exit for AVD:"转到“设置”->“常规”,底部“在退出时为 AVD 保存快速启动状态:” 在此处输入图片说明

You can also do it via command line:您也可以通过命令行执行此操作:

emulator @avd_name -no-snapshot-save 

check details查看详情

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM