我正在尝试在旧笔记本电脑中使用 Android Studio 模拟器 - 我已经做了很多尝试,似乎 CPU 能够使模拟器运行。 CPU 是 Core i7 Q720,在 win 8.1 中系统的反应方式相同,所以现在我安装的是全新的 Win 10 Pro。 当我尝试使用 Android Studio 的 IDE 启动模拟器时,我收到一个非详细错误,因此在终端中我可以得到:
.\emulator-check.exe hyper-v
hyper-v:
1
Hyper-V is disabled
hyper-venter code here
和
.\emulator-check.exe cpu-info
cpu-info:
146
Intel CPU|Virtualization is supported|64-bit CPU|
cpu-info
和
.\emulator-check.exe accel
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.
accel:
0
HAXM version 7.6.5 (4) is installed and usable.
accel
所以看起来不错,但是当我启动一台机器时,无论是否是超级用户,我都会立即看到模拟器,然后关闭,我的猜测是 VCPU 请求关闭了它,但我不知道为什么......任何建议从哪里开始搜索?
.\emulator.exe -avd Pixel_3a_API_34_extension_level_7_x86_64 -feature -Vulkan
INFO | Android emulator version 32.1.14.0 (build_id 10330179) (CL:N/A)
INFO | Found systemPath C:\Users\[MyUser]\AppData\Local\Android\Sdk\system-images\android-34\google_apis\x86_64\
INFO | Storing crashdata in: C:\Users\[MyUser]\AppData\Local\Temp\\AndroidEmulator\emu-crash.db, detection is enabled
INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO | IPv4 server found: 1.1.1.1
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.
WARNING | Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.
WARNING | cannot add library vulkan-1.dll: failed
WARNING | cannot add library vulkan-1.dll: failed
INFO | Sending adb public key [QAAAAAucQBJd8NedUGqjFkJIgCndx2PInKaLe5CyEHiGvk9Mi3XPGTHpN+kQL+ExSfrhGmAWcp53RMVWdPiQKXel2BfE+3xY0DFq6NIid9J9w7ZPZbOxOrlPDUukDGTGZpFSK6b3rYvpB9EbCuy4crK1TJzemmJdHJ06ba8NWCwoo+M4MsNUCtyErAiI3W35zco3QnpAJOWi4B+OePTYmu94P+AGBPgYCjzAaEogKj2vKMwcFfj8rMxON91jOEdHggLit2D65oHQNJ/nF9feqr0ChdBP3sV/2abHTKCal2Ap24VVA/KISqbqoC8f0Zpu6rSNE5ZAp03acoDq5V8H6OZ9rfbzpanIgkyXfddn1wQ+1p9Moi95cdfnH82MXoycNMYZHoqZCAvo6KQ6RSkXEn1Wgrq+2lysfGmxO7p117U3lfMSpHXvx+8waZKT17zz3INDt9Zfi0mPp4Ijp4nIrPguaLXEG5dD5+MM6DdN7qAyEwhm7v9HD3JAKVFLntw1d+vTfgGrlRgW5CIu/iS9wOIA5BZETyiw0K9izh6l7FYwYvroJtm8d79mQgZ+7jr3taHfuCSmFPe9i8Uy8xpphn4gHT0gR6btt95/ec1/nD4uxZM6YSluXpSKtPfnpGVkHllSN/y14ZojyPzZNNR/1ryRjlvu0E/3QaQu4T/1za6MPyLdUVIHbAEAAQA= @unknown]
INFO | added library C:\Users\[MyUser]\AppData\Local\Android\Sdk\emulator\lib64\vulkan\vulkan-1.dll
HAX is working and emulator runs in fast virt mode.
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: none
INFO | Advertising in: C:\Users\[MyUser]\AppData\Local\Temp\avd\running\pid_7448.ini
INFO | Setting display: 0 configuration to: 1080x2220, dpi: 440x440
VCPU shutdown request
WARNING | Not saving state: RAM not mapped as shared
谢谢
在我的尝试中,从Win 8.1切换到新的Win10专业版,卸载HAMX,重新安装它,BlueStacks可以工作,VirtualBox不行
我终于做了一些其他的作业并且得到了! 经过一些更改后,Oracle VM 启动了,它给我的感觉是模拟器也应该可以工作。
现在,阅读 Android Studio 的日志时,我的注意力集中在这段摘录上:
2023-08-03 14:46:13,039 [ 95612] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Activated packet streamer for bluetooth emulation
2023-08-03 14:46:13,777 [ 96350] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - Your emulator is out of date, please update by launching Android Studio:
2023-08-03 14:46:13,777 [ 96350] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - - Start Android Studio
2023-08-03 14:46:13,777 [ 96350] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - - Select menu "Tools > Android > SDK Manager"
2023-08-03 14:46:13,778 [ 96351] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - - Click "SDK Tools" tab
2023-08-03 14:46:13,778 [ 96351] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - - Check "Android Emulator" checkbox
2023-08-03 14:46:13,778 [ 96351] INFO - Emulator: Pixel_3a_API_34_extension_level_7_x86_64 - - Click "OK"
显然,安装的模拟器版本是与 Giraffe 捆绑在一起的,所以使用 SDK Manager 我只能重新安装相同的版本(这并不能解决我的问题),所以检查了一下并没有发现我最终发现了什么
https://developer.android.com/studio/emulator_archive
安装最新版本后它开始工作。慢慢地导致我的平台受到限制,但有效。
因此 Android Studio 附带的版本将无法工作,需要以手动安装的旧方式更新到最新的模拟器。 特别注意的是,日志现在像以前一样报告模拟器仍需更新,因此问题不是旧版本而是版本本身。