Android 模拟器死机

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22920729/
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 06:33:46  来源:igfitidea点击:

Android Emulator freezes

androidandroid-emulator

提问by Csabi

Until the last SDK release, my Android Emulator worked very nice with x86 architecture, installing Intel HAXM and enabling GPU for the device in AVD Manager.

直到最后一个 SDK 发布,我的 Android 模拟器在 x86 架构下运行得非常好,安装了 Intel HAXM 并在 AVD 管理器中为设备启用 GPU。

With the latest SDK release, I reinstalled my Windows (from 8.0 to 8.1), tried both 1.06 and 1.07 Intel HAXM and my app freezes quite frequently.

使用最新的 SDK 版本,我重新安装了我的 Windows(从 8.0 到 8.1),尝试了 1.06 和 1.07 Intel HAXM,我的应用程序经常死机。

It doesn't freeze to death, just the freezes/does not updates the screen anymore.

它不会冻结致死,只是冻结/不再更新屏幕。

Especially if I'm swiping a ViewPager, then it freezes almost always in between pages.

特别是如果我正在滑动 ViewPager,那么它几乎总是在页面之间冻结。

BUT, if I click a menuitem on the AppBar, it refreshes itself and draws the destination ViewPage page.

但是,如果我单击 AppBar 上的菜单项,它会自行刷新并绘制目标 ViewPage 页面。

I'd appreciate any advice, because right now app development via emulator became ultrapainful.

我很感激任何建议,因为现在通过模拟器开发应用程序变得非常痛苦。

采纳答案by Tukajo

Use the emulators provided by Genymotion; they are faster and more reliable than any emulator I've worked with for Android.

使用 Genymotion 提供的模拟器;它们比我为 Android 使用过的任何模拟器都更快、更可靠。

http://www.genymotion.com/:)

http://www.genymotion.com/:)

Good luck!

祝你好运!

P.S. they also have an eclipse plug-in.

PS他们也有一个eclipse插件。

EDIT:

编辑:

This answer is no longer applicable. However given that it is the "accepted" answer, I am unable to delete this.

这个答案不再适用。但是,鉴于它是“已接受”的答案,我无法删除它。

回答by Aasim Ali

Try this:

尝试这个:

In the Android Virtual Device (AVD) settings, select
- edit this AVD, then click
- show advanced settingthen
- DISABLEmulti-core CPU.

在 Android Virtual Device (AVD) 设置中,选择
- edit this AVD,然后单击
-show advanced setting然后
- DISABLEmulti-core CPU

回答by Edward Brey

In the Android Virtual Device (AVD) settings, turn off the Use Host GPUemulation option. Unfortunately, the resulting slowness is often worse than the freezing.

在 Android Virtual Device (AVD) 设置中,关闭Use Host GPUemulation 选项。不幸的是,由此产生的缓慢往往比冻结更糟糕。

回答by Gimme the 411

My emulator froze and I couldn't fix it with the other answers, but this solved it:

我的模拟器死机了,我无法用其他答案修复它,但这解决了它:

  1. Tools->AVD Manager

  2. In the Actionscolumn for your virtual device, click the white arrow on the right and then click Wipe Data.

  1. 工具-> AVD 管理器

  2. 在虚拟设备的操作列中,单击右侧的白色箭头,然后单击擦除数据

This will clear the cache for the virtual device.

这将清除虚拟设备的缓存。

If your app depends on Google Play services, you will need to update it again

如果您的应用依赖于 Google Play 服务,则需要再次更新

回答by Edward Brey

Use the free Visual Studio Emulator for Android. It's very fast, and despite its name, does not require you to work in Visual Studio to use it. Android Studio and Eclipse happily detect it as the running emulator.

使用免费的Visual Studio Emulator for Android。它非常快,尽管它的名称如此,但不需要您在 Visual Studio 中工作即可使用它。Android Studio 和 Eclipse 很高兴地将其检测为正在运行的模拟器。

回答by David Vareka

Setting Boot option to Cold boot worked like a charm for me. Absolutely no idea why.

将启动选项设置为冷启动对我来说就像一个魅力。完全不知道为什么。

Also disabling advanced profiling helped me with older versions (API 21).

禁用高级分析也帮助我使用旧版本(API 21)。

enter image description here

在此处输入图片说明

回答by Alex Nguyen

Try this :

尝试这个 :

sdk\tools\emulator.EXE -partition-size 512 -noaudio -no-boot-anim -avd Nexus5XAPI25 -prop monodroid.avdname=Nexus5XAPI25

After I added -noaudio option,it's ok

添加 -noaudio 选项后,就可以了

回答by Edward Brey

From the Android SDK Manager, install Intel x86 Emulator Accelerator (HAXM installer) revision 5 or later, and then run sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.msito update the drivers on your PC. This is version 1.1.0 of the accelerator, which seems to fix the freezing bug.

从 Android SDK 管理器中,安装 Intel x86 Emulator Accelerator(HAXM 安装程序)修订版 5 或更高版本,然后运行sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.msi以更新 PC 上的驱动程序。这是加速器的 1.1.0 版本,似乎修复了冻结错误。