Android模拟器有点迟钝。对于摩托罗拉Droid和Nexus One等设备,应用程序在实际设备上的运行速度比模拟器快。在测试游戏和视觉效果时,这是一个问题。

如何使模拟器尽可能快地运行?我一直在摆弄它的参数,但还没有发现一个配置显示出明显的改进。


当前回答

I think it is because clr virtual machine uses cpu directly without code opcode translation. It may be optimization for clr application or may be windows mobile/window phone 7 started on INTEL proccessor. Android platform based on linux and theoretically you can start android on virtual machine in i686 environment. In this case virtual machines such as vmware could execute some opcodes direcly. But this option will be allowed only if you write on the Java. Because the Java interpret their byte-code or precompile it before execution. see: http://www.taranfx.com/how-to-run-google-android-in-virtualbox-vmware-on-netbooks

其他回答

如果你没有一个好的显卡(像我一样),选择一个低分辨率的模拟器(例如:Nexus S)

启用这个选项对我很有效。

AVD管理器->选择设备并单击“编辑”->启用“使用主机GPU”选项

Thank you @zest! Worked like a charm. Some things of note: Need to apply Intel's hotfix for the HAXM to deal with kernel panic issue: http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager Also, note, if you have more than one abi, you need to uninstall one due to a bug in the latest version of the Android API (r19): https://code.google.com/p/android/issues/detail?id=66740 (remove armeabi-v7a in this case, since you want the x86 abi). Other than the 45-minutes it took me to resolve these, it was an very rewarding exercise in terms of the increased performance of the emulator.

启用GPU硬件加速(除了Intel的HAXM),如果你使用API 15 v3或更新版本和SDK Tools v17+。模拟器的图形加速利用开发计算机的图形硬件,特别是图形处理单元(GPU),使屏幕绘制速度更快。这大大提高了速度。

要在模拟器上启用默认启用的图形加速:在创建AVD时,在“硬件”部分单击“新建”,选择“GPU仿真”并将值设置为“是”。

要只在运行时启用加速:在启动模拟器时使用-gpu标志,如下所示:

emulator -avd <avd_name> -gpu on

来源:谷歌的使用模拟器教程。

I think it is because clr virtual machine uses cpu directly without code opcode translation. It may be optimization for clr application or may be windows mobile/window phone 7 started on INTEL proccessor. Android platform based on linux and theoretically you can start android on virtual machine in i686 environment. In this case virtual machines such as vmware could execute some opcodes direcly. But this option will be allowed only if you write on the Java. Because the Java interpret their byte-code or precompile it before execution. see: http://www.taranfx.com/how-to-run-google-android-in-virtualbox-vmware-on-netbooks