赞
踩
在Android 13版本上,关于“复制”有了新的变化,但是我在我的小米手机(也是Android 13版本的)上测试没有看到对应的变化,所以想运行一个Android 13的模拟器来测试看看,结果死活运行不起来,一直卡在开机画面: “Pixel is starting…”,如下:
如上图,那个进度条也是不动的了,就一直卡住,等多久都没用,如果此时我调整模拟器窗口大小的话,则模拟器会变黑屏。
我选择的系统镜像如下:
一开始我以为是我没安装硬件加速执行管理器:Sdk\extras\intel\Hardware_Accelerated_Execution_Manager\silent_install.bat
,早期版本的时候有个silent_install_readme.txt
文件的,用于描述这个批处理文件怎么用的,但是最新版本没有这个文件了,所以这里也复制一下这个说明文件:
overall: When this script is executed without Admin permission, a UAC window will pop up to ask for permission escalate. Install: silent_install.bat [-log log_full_path] [-ld log_full_path] -log: the full path of the log file. if not specified, use default log path. default log path in Windows: ./haxm_silent_run.log. This log only prints the error message or succussful message. -ld: the full path of the log file. This log prints the detail log message. It is used for debug. In case of success: Windows will print "Intel HAXM installed successfully!" Return 0 to caller In case of fail: Print "Failed to install Intel HAXM. For details, please check the installation log: <log path>" Return 1 to caller In case of HAXM is already installed: HAXM will be upgraded automatically. In case the machines needs to reboot after install/update: Print "Please reboot your machine!" Return 2 to caller. Uninstall: silent_install.bat -u [-log log_full_path] -log: the full path of the log file. if not specified, use default log path. default log path in Windows: .\haxm_silent_run.log In case of success: Windows will print "Intel HAXM uninstalled successfull!". Return 0 to caller In case of fail: Print "Failed to uninstall Intel HAXM! For details, please check the installation log <log path>!" Return 1 to caller In case of haxm not installed: Print "Intel HAXM is not installed!" Return 0 to caller Misc silent_install.bat -v If haxm is installed: Print haxm version. Return 0 to caller If haxm is not installed: print nothing Return 1 to caller silent_install.bat -c Check VT/NX capability of the platform Print following message: VT support -- yes|no NX support -- yes|no Return 0 to caller if both VT/NX are supported Return 1 to caller if either VT/NX is not supported. silent_install.bat -h Print usage Return 0 to caller Wrong parameters: Print "invalid_param for <intput>" Return 1 to caller known issues: 1. XD/VT check with "-c" option will only show the CPU capability. it cannot tell if XD/VT is disabled by BIOS
总结一下主要的命令:
silent_install.bat -h // 查看此批处理文件的使用帮助,通过这个命令可以发现已经没有 -c 参数了。
silent_install.bat -v // 查看是否安装了haxm(即Hardware Accelerated Execution Manager 硬件加速执行管理器)
silent_install.bat // 安装haxm
silent_install.bat -u // 卸载haxm
我安装发现安装不上,卸载也说卸载失败,我以为是bios里面的那个虚拟的什么开关没打开,但是检查bios已经是打开了的。安装失败时会生产一个日志文件,查看日志如下:
Version: 7.6.5
Execute: C:\Program Files\Intel\HAXM\checktool.exe --verbose
CPU vendor * GenuineIntel
Intel64 supported * Yes
VMX supported - No
VMX enabled - No
EPT supported - No
NX supported * Yes
NX enabled * Yes
Hyper-V disabled - No
OS version * Windows 10.0.22000
OS architecture * x86_64
Guest unoccupied * Yes. 0 guest(s)
The system requirements are not satisfied.
“The system requirements are not satisfied.”表明说系统需求不满足,再看前面的 “Hyper-V disabled - No”,应该是表示说 “Hyper-V” 没禁用,使用硬件加速功能时应该是不能使用“Hyper-V”的,我查看“Hyper-V” 明明是禁用的啊,如下图:
即便我勾选后打开,打开后需要重启电脑,重启后再关掉它,又要重启电脑,此时还是安装不上。后来百度说这里看着是关的但可能还没关,要用命令来关,以管理员方式启动PowerShell,然后输入指令:bcdedit /set hypervisorlaunchtype off
,然后重启电脑,再次安装haxm
即可。
haxm
是安装上了,但是模拟器运行的时候依旧是卡在 “Pixel is starting…” 就不动了。后面发现创建API 33版本的模拟器才会这样,我创建API 26的又正常运行了,以为是API 33的版本出了Bug,但是后面调了一下参数之后又可以了,如下图:
“Graphics
” 的默认值是 “Automatic
”,改成 “Software - GLES 2.0
” 即可,运行结果如下:
我第一次运行的时候经常报UI无响应异常,如下:
我也不知道怎么回事,关闭再启动第二次它又没这个问题了,如果一直有的话也可以尝试调大配置看看,如下:
这里的参数,比如CPU数量、内存大小、堆大小、内部存储大小等可以适当调大一些试试看,上面截图我是没有调整过的,是默认值。当我们创建不同分辨率或不同镜像的模拟器时,这些参数默认值有可能不相同。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。