windows虚拟机中Android Studio启动模拟器踩坑记录


windows虚拟机中Android Studio启动模拟器状态一直是Booting,通过命令行C:\Android\Sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Medium_Phone_API_35 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300 启动emulator输出报错:USER_WARNING | Suggested minimum number of CPU cores to run avd 'Medium_Phone_API_35' is 4 (available: 2) ,通过搜索修改虚拟机cpu core的数为4即可。再次命令行启动输出报错:Android Studio Emulator Failed to load [vulkan-1.dll],通过搜索把C:\Android\Sdk\emulator\lib64\vulkan\vulkan-1.dll 拷贝一份到C:\Android\Sdk\emulator\lib64\ 目录下 或C:\Windows\System32即可。 然后直接在Android Studio界面可成功启动模拟器,但是模拟器会不停弹窗提示The system ui isn't responding in android emulator, 通过搜索把$HOME/.android/avd/MyAvdName.avd/config.ini文件中的hw.gpu.mode的值从auto 改为host,还有的建议是从"hw.gpu.enabled=no hw.gpu.mode=auto"改为"hw.gpu.enabled=no hw.gpu.mode=off" 或者"hw.gpu.enabled=yes hw.gpu.mode=host",重新启动,稍等几分钟后就不再提示isn't responding。


    参考:
    

https://stackoverflow.com/a/68233639

https://developer.android.com/studio/run/emulator-troubleshooting#error-vulkan-1-dll


评论

此博客中的热门博文

Cobalt Strike automigrate自动迁移进程脚本

vultr安装kali linux 折腾笔记

菜刀连接php一句话木马返回200的原因及解决方法