Windows:如何强制 Android 模拟器使用 Intel HAXM

Windows:如何强制 Android 模拟器使用 Intel HAXM

模拟器尝试使用 WHPX 而不是 HAXM。HyperV 和 Windows Hypervisor Platform 功能均已禁用。

但是日志显示,从命令行运行模拟器时,它仍会尝试通过“-enable-whpx”标志使用 WHPX,从而导致模拟器崩溃。如何强制模拟器使用 HAXM?

emulator: Checking whether Windows Hypervisor
Platform (WHPX) is available.
emulator: WinHvPlatform.dll found. Looking for WHvGetCapability...
emulator: WHvGetCapability found. Querying WHPX capabilities...
emulator: WHvGetCapability failed. hr=0x00000000 whpx_cap.HypervisorPresent? 0

emulator: WHPX is either not available or not installed.
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 7.2.0 (4) is installed and usable.
emulator: checking cpu acceleration from main qemu params
QEMU options list:
emulator: argv[00] = ".\emulator64-x86.exe"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "192.168.0.1,fec0:0:0:ffff::1,fec0:0:0:ffff::2,fec0:0:0:ffff::3"
emulator: argv[03] = "-serial"
emulator: argv[04] = "null"
emulator: argv[05] = "-serial"
emulator: argv[06] = "null"
emulator: argv[07] = "-enable-whpx"
emulator: argv[08] = "-android-hw"
emulator: argv[09] = "<path>\hardware-qemu.ini"
emulator: argv[10] = "-append"
emulator: argv[11] = "qemu=1 no_timer_check androidboot.hardware=goldfish androidboot.serialno=EMULATOR28X0X16X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.opengles.version=131072 ndns=4 loop.max_part=7 qemu.dalvik.vm.heapsize=256m"
Concatenated QEMU options:
 .\emulator64-x86.exe -dns-server 192.168.0.1,fec0:0:0:ffff::1,fec0:0:0:ffff::2,fec0:0:0:ffff::3 -serial null -serial null -enable-whpx -android-hw <path>/hardware-qemu.ini -append 'qemu=1 no_timer_check androidboot.hardware=goldfish androidboot.serialno=EMULATOR28X0X16X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.opengles.version=131072 ndns=4 loop.max_part=7 qemu.dalvik.vm.heapsize=256m'
VERBOSE: AdbInterface.cpp:159: Found: 3 adb executables
VERBOSE: AdbInterface.cpp:161: Adb: <SDK path>\platform-tools\adb.exe
VERBOSE: AdbInterface.cpp:161: Adb: <SDK path>\platform-tools\adb.exe
VERBOSE: AdbInterface.cpp:161: Adb: <SDK path>\platform-tools\adb.exe
VERBOSE: AdbInterface.cpp:180: Path:<SDK path>\platform-tools\adb.exe     protocol version: 40 VERBOSE: AdbInterface.cpp:180: Path:<SDK path>\platform-tools\adb.exe protocol version: 40 VERBOSE: AdbInterface.cpp:180: Path:<SDK Path>\platform-tools\adb.exe protocol version: 40 VERBOSE: AdbHostServer.cpp:95: Unable to connect to adb daemon on port: 5037
emulator: Warning: config.ini contains invalid skin.path entry: (null)
emulator: Starting QEMU main loop
emulator: registered 'boot-properties' qemud service
.\emulator64-x86.exe: invalid option -- '-enable-whpx'emulator: Done with QEMU main loop
emulator: User-config was not changed.

相关内容