在AndroidStudio的虚拟设备中运行app报错

在安卓的虚拟设备中运行app时出现以下错误:

1
2
Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
Emulator: Process finished with exit code 1

解决办法是:点击Android Studio菜单的tools/SDK manager,选择Appearance & Behavior/System Settings/Android SDK右边的SDK Tools,勾选Intel x86 Emulator Accelerator (HAXM installer),点击Apply安装。

tools/SDK manager
Intel x86 Emulator Accelerator (HAXM installer)