无法启动android模拟器V30.9.4
我得到了这个错误信息:
INFO | Android emulator version 30.9.4.0 (build_id 7759208) (CL:N/A)
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
WARNING | cannot add library /Users/-/Library/Android/sdkPreview/emulator/qemu/darwin-aarch64/lib64/vulkan/libvulkan.dylib: failed
WARNING | cannot add library /Users/-/Library/Android/sdkPreview/emulator/lib64/vulkan/libvulkan.dylib: failed
ERROR | EglOsGlLibrary: Could not open GL library libGLESv2.dylib [dlopen(libGLESv2.dylib, 0x0002): tried: '/Users/-/Library/Android/sdkPreview/emulator/lib64/qt/lib/libGLESv2.dylib' (no such file), '/Users/-/Library/Android/sdkPreview/emulator/lib64/gles_swiftshader/libGLESv2.dylib' (code signature]
ERROR | EglOsEglDispatcher: Could not open EGL library libEGL.dylib [dlopen(libEGL.dylib, 0x0002): tried: '/Users/-/Library/Android/sdkPreview/emulator/lib64/qt/lib/libEGL.dylib' (no such file), '/Users/-/Library/Android/sdkPreview/emulator/lib64/gles_swiftshader/libEGL.dylib' (code signature in <5C3A]
使用sudo权限。
- 尝试使用主机系统的OpenGL驱动程序:
cd $ANDROID_SDK_ROOT/emulator
./emulator -avd <Pixel_4_API_29> -gpu host
- 然后进入模拟器设置->设置→先进。
- 选择OpenGL ES渲染器"基于主机"自动检测。
- 保存,重启。
注:获取avds列表:
./emulator -list-avds
https://developer.android.com/studio/run/emulator-acceleration command-gpu