vs2022 android模拟器闪退
vs2022 android模拟器闪退
现象:调试android程序,弹窗要求发送错误报告,报告内容中报错:Crash reason: EXCEPTION_ACCESS_VIOLATION_READ 0x4 ntdll.dll
执行:命令行执行"C:\Program Files (x86)\Android\android-sdk\emulator\emulator.exe" -partition-size 2000 -no-boot-anim -verbose -feature WindowsHypervisorPlatform -avd tablet_420-dpi_8in_-_api_35 -prop monodroid.avdname=tablet_420-dpi_8in_-_api_35
(tablet_420-dpi_8in_-_api_35需换成你的名称,看提示修改)
报错如下:
checking for bad AMD Vulkan driver version...
amdvlk64.dll not found. Checking for amdvlk32...
amdvlk32.dll not found. No bad AMD Vulkan driver versions found.
checking for bad vulkan-1.dll version...
vulkan-1.dll version: 1.3.280.0
Not known bad vulkan-1.dll version; continue.
ERROR | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: Android Emulator hypervisor driver is not installed on this machine
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.
解决:
bios中开启虚拟化;关闭操作系统的Hyper-V,并重启
在vs2022的android sdk和工具中:安装android emulator hypervisor driver 2.0.0
手动执行C:\Program Files (x86)\Android\android-sdk\extras\google\Android_Emulator_Hypervisor_Driver\silent_install.bat
浙公网安备 33010602011771号