簡體   English   中英

android studio avd manager無效選項 - '-enable-whpx'

[英]android studio avd manager invalid option — '-enable-whpx'

我在使用android studio avd manager運行任何模擬器時遇到錯誤:

...AppData\Local\Android\Sdk\emulator/emulator-x86.exe: invalid option -- '-enable-whpx' 
  • android studio版本是3.1.3
  • android模擬器版本是27.3.9
  • Hyper-V和Windows Hypervisor平台在我的Windows 10上處於活動狀態
  • 並且設置了WindowsHypervisorPlatform = on標志...sdk\\emulator\\lib/advancedFeatures.ini

這是詳細模式的一部分:

emulator: Checking whether Windows Hypervisor Platform (WHPX) is available.
emulator: Could not load library WinHvPlatform.dll
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.

在Windows功能中檢查Windows Hypervisor平台,並且C:\\Windows\\System32存在WinHvPlatform.dll

我該如何啟用或安裝WHPX?

只需更改模擬器引擎即可解決我的問題。

根據文檔,您可以使用-engine標志指定模擬器引擎。 使用classic引擎發生上述錯誤。 當我將引擎更改為autoqemu2 ,模擬器啟動時沒有錯誤。 使用命令行將引擎更改為.../sdk/emulator目錄並運行:

emulator.exe -list-avds

這將輸出您的虛擬設備名稱

然后運行:

emulator.exe -avd YOUR_DEVICE_NAME -engine qemu2

要么

emulator.exe -avd YOUR_DEVICE_NAME -engine auto

我希望這能幫到您。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM