Emulator Android Accelerated x86_Oreo 无法使用 Visual Studio 启动
Posted
技术标签:
【中文标题】Emulator Android Accelerated x86_Oreo 无法使用 Visual Studio 启动【英文标题】:Emulator Android_Accelerated_x86_Oreo cannot be started With Visual Stuido 【发布时间】:2021-07-24 14:24:23 【问题描述】:我正在使用 Visual Studio 使用 Xamarin 开发 android 应用程序。我已经检查了 Windows 超级版本和英特尔 X86,但是当我尝试运行模拟器时,它没有运行并且在控制台窗口 Visual Studio 上显示以下错误。
'"C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe"' -partition-size 512 -no-boot-动画 -verbose -feature WindowsHypervisorPlatform -avd Android_Accelerated_x86_Oreo -prop monodroid.avdname=Android_Accelerated_x86_Oreo 模拟器 Android_Accelerated_x86_Oreo 无法启动。 运行时检查已完成 构建已被取消。
我尝试运行模拟器,但它显示以下错误消息。
这是完整的控制台消息。
Starting runtime checks
Starting emulator Android_Accelerated_x86_Oreo ...
C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -partition-size 512 -no-boot-anim -verbose -feature WindowsHypervisorPlatform -avd Android_Accelerated_x86_Oreo -prop monodroid.avdname=Android_Accelerated_x86_Oreo1>------ Build started: Project: MobileApp, Configuration: Debug Any CPU ------
WARNING: unexpected '-prop' value ('monodroid.avdname=Android_Accelerated_x86_Oreo'), only 'qemu.*' properties are supported
Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
handleCpuAcceleration: feature check for hvf
emulator: autoconfig: -skin 768x1280
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\\kernel-ranchu
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\\ramdisk.img
emulator: Using initial system image: C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\\system.img
emulator: Using initial vendor image: C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\\vendor.img
emulator: autoconfig: -data C:\Users\Khundokar Nirjor\.android\avd\Android_Accelerated_x86_Oreo.avd\userdata-qemu.img
emulator: autoconfig: -initdata C:\Users\Khundokar Nirjor\.android\avd\Android_Accelerated_x86_Oreo.avd\userdata.img
emulator: autoconfig: -cache C:\Users\Khundokar Nirjor\.android\avd\Android_Accelerated_x86_Oreo.avd\cache.img
emulator: autoconfig: -sdcard C:\Users\Khundokar Nirjor\.android\avd\Android_Accelerated_x86_Oreo.avd\sdcard.img
emulator: Increasing RAM size to 1536MB
emulator: VM heap size 64MB is below hardware specified minimum of 384MB,setting it to that value
emulator: System image is read only
emulator: VERBOSE: System.cpp:3003: querying file version info API...
emulator: VERBOSE: System.cpp:3011: found kernelbase.dll
emulator: VERBOSE: System.cpp:3019: GetFileVersionInfoSizeW found. On Windows 10?
emulator: VERBOSE: System.cpp:3028: GetFileVersionInfoW found. On Windows 10?
emulator: VERBOSE: System.cpp:3058: VerQueryValueW found. Can query file versions
emulator: VERBOSE: System.cpp:3081: queryFileVersionInfo: path not found: amdvlk64.dll
emulator: VERBOSE: System.cpp:3003: querying file version info API...
emulator: VERBOSE: System.cpp:3081: queryFileVersionInfo: path not found: amdvlk32.dll
emulator: VERBOSE: System.cpp:3003: querying file version info API...
emulator: VERBOSE: System.cpp:3081: queryFileVersionInfo: path not found: vulkan-1.dll
emulator: Found 4 DNS servers: 172.20.10.1 fec0:0:0:ffff::1 fec0:0:0:ffff::2 fec0:0:0:ffff::3
emulator: [FeatureControl] Feature 'WindowsHypervisorPlatform' (15) state set to enabled
emulator: found magic skin width=768 height=1280 bpp=16
emulator: CPU Acceleration: DISABLED
emulator: CPU Acceleration status: Android Emulator requires an Intel processor with VT-x and NX support. (VT-x is not supported)
emulator: ERROR: x86 emulation currently requires hardware acceleration!
CPU acceleration status: Android Emulator requires an Intel processor with VT-x and NX support. (VT-x is not supported)
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.
emulator: Android emulator version 30.5.5.0 (build_id 7285888) (CL:N/A)
emulator: Found AVD name 'Android_Accelerated_x86_Oreo'
emulator: Found AVD target architecture: x86
emulator: argv[0]: 'C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE'; program directory: 'C:\Program Files (x86)\Android\android-sdk\emulator'
emulator: Found directory: C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\
emulator: emuDirName: 'C:\Program Files (x86)\Android\android-sdk\emulator'
emulator: Found directory: C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\
emulator: Probing for C:\Program Files (x86)\Android\android-sdk\system-images\android-27\google_apis\x86\\kernel-ranchu-64: file missing
emulator: try dir C:\Program Files (x86)\Android\android-sdk\emulator
emulator: Trying emulator path 'C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe'
emulator: Found target-specific 64-bit emulator binary: C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64\gles_angle'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64\gles_angle9'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64\gles_angle11'
emulator: Adding library search path: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64\gles_swiftshader'
emulator: Adding library search path for Qt: 'C:\Program Files (x86)\Android\android-sdk\emulator\lib64\qt\lib'
emulator: Silencing all qWarning(); use qCWarning(...) instead: QT_LOGGING_RULES=default.warning=false
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=C:\Program Files (x86)\Android\android-sdk\emulator\lib64\qt\plugins
emulator: Setting Qt to use software OpenGL: QT_OPENGL=software
emulator: Setting QML to use software QtQuick2D: QMLSCENE_DEVICE=softwarecontext
emulator: Overriding pre-existing bad Qt high dpi settings...
emulator: Quoted param: ["C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe"]
emulator: Quoted param: [-partition-size]
emulator: Quoted param: [512]
emulator: Quoted param: [-no-boot-anim]
emulator: Quoted param: [-verbose]
emulator: Quoted param: [-feature]
emulator: Quoted param: [WindowsHypervisorPlatform]
emulator: Quoted param: [-avd]
emulator: Quoted param: [Android_Accelerated_x86_Oreo]
emulator: Quoted param: [-prop]
emulator: Quoted param: [monodroid.avdname=Android_Accelerated_x86_Oreo]
emulator: Running :C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe
emulator: qemu backend: argv[00] = ""C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe""
emulator: qemu backend: argv[01] = "-partition-size"
emulator: qemu backend: argv[02] = "512"
emulator: qemu backend: argv[03] = "-no-boot-anim"
emulator: qemu backend: argv[04] = "-verbose"
emulator: qemu backend: argv[05] = "-feature"
emulator: qemu backend: argv[06] = "WindowsHypervisorPlatform"
emulator: qemu backend: argv[07] = "-avd"
emulator: qemu backend: argv[08] = "Android_Accelerated_x86_Oreo"
emulator: qemu backend: argv[09] = "-prop"
emulator: qemu backend: argv[10] = "monodroid.avdname=Android_Accelerated_x86_Oreo"
emulator: Concatenated backend parameters:
'"C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe"' -partition-size 512 -no-boot-anim -verbose -feature WindowsHypervisorPlatform -avd Android_Accelerated_x86_Oreo -prop monodroid.avdname=Android_Accelerated_x86_Oreo
Emulator Android_Accelerated_x86_Oreo cannot be started.
Runtime checks completed
Build has been canceled.
【问题讨论】:
您可以尝试禁用[Hyper-V]和[Windows Hypervisor Platform]。然后重新启动电脑,并启用[Hyper-V]和[Windows Hypervisor Platform],再次重新启动电脑。 我发现只有window hypervisor平台,我检查了它,但我的电脑里有英特尔奔腾处理器 【参考方案1】:错误信息给出了一个非常明确的信息,说明出了什么问题以及如何解决它
模拟器:CPU 加速:禁用模拟器:CPU 加速 状态:Android 模拟器需要带有 VT-x 和 NX 的 Intel 处理器 支持。 (不支持 VT-x)模拟器:错误:x86 仿真 目前需要硬件加速! CPU加速状态: Android Emulator 需要支持 VT-x 和 NX 的 Intel 处理器。 (不支持 VT-x)有关配置 VM 加速的更多信息 视窗: https://developer.android.com/studio/run/emulator-acceleration#vm-windows
【讨论】:
已安装英特尔 X86 仿真器加速器以上是关于Emulator Android Accelerated x86_Oreo 无法使用 Visual Studio 启动的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu android studio AVD 错误:Emulator: emulator: ERROR: VkCommonOperations.cpp:540: Failed to create
Android Studio启动时报错 Emulator: emulator: ERROR: OpenGLES emulation failed to initialize.