簡體   English   中英

無法啟動 android 模擬器 - 檢測到 Hyper V 但 Hypervisor 平台不可用

[英]Can not start android emulator - Hyper V detected but Hypervisor platform is not available

我遇到了無法啟動 xamarin android 模擬器的問題,它說:

Device error: WARNING | unexpected '-prop' value ('monodroid.avdname=pie_9_0_-_api_28'), only 'qemu.' properties are supported
WARNING | unexpected '-prop' value ('emu.uuid=c23d7e88-c1e4-4283-bb2b-e2632b5c3c16'), only 'qemu.' properties are supported
ERROR   | x86 emulation currently requires hardware acceleration!
CPU acceleration status: Hyper-V detected and Windows Hypervisor Platform is not available. Please either disable Hyper-V or upgrade to Windows 10 1803 or later. To disable Hyper-V, start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot. If u
More info on configuring VM acceleration on Windows:
https://developer.android.com/studio/run/emulator-acceleration#vm-windows
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.

需要為模擬器加速啟用 Hyper-V,否則如果我禁用它,模擬器上的應用程序運行緩慢。 問題是我之前啟用了 hyper-v,我所有的模擬器都運行得很好,然后突然我開始收到這個錯誤。 Windows 功能中啟用了 Hyper-V 和 Windows Hypervisor Platform。 我還為 android 安裝了 HAXM 加速器。 我還嘗試運行以下命令: bcdedit /set hypervisorlaunchtype auto 和 dism /online /enable-feature /feature-name:Microsoft-Hyper-V -All; 這兩個命令都導致“操作成功完成”。 我還嘗試運行“C:\Program Files (x86)\Android\android-sdk\emulator\emulator-check.exe”加速,這就是我得到的:

accel:
0
Please disable Hyper-V before using the Android Emulator.  Start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot.WHPX (10.0.19042) is installed and usable.
accel

我不確定發生了什么,以及為什么我的模擬器突然無法在啟用 Hyper-V 的情況下運行。 有沒有人遇到過這個問題? 任何幫助將非常感激。 謝謝

卸載HAXM; 上面寫着: WHPX (10.0.19042) is installed and usable.

這是“Windows Hypervisor 平台”...

https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows

這很奇怪,但直到今天我仍然無法在 VS2019 中啟動 android 模擬器。 但是,我找到了一個解決方法——我可以在 VS2017 中啟動 android 模擬器,所以我在那里啟動它並從 VS2019 運行應用程序。 非常奇怪,但如果有人遇到這個問題並且迫切需要解決方法,這就是你可以做的。 我不知道這是否有幫助,但就今天而言,這是我找到的唯一解決方案。

(另外,考慮切換到 VS2022。似乎在那里也可以正常工作)

暫無
暫無

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

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