问题描述
我在我的 mac os High sierra 上全新安装了最新的 Android studio,笔记本电脑上没有以前版本的 Android studio.当我尝试运行基本代码时,AVD 不断崩溃.
I did a fresh install of latest Android studio on my mac os High sierra, there was no previous version of Android studio on the laptop. AVD keeps crashing when I try to run a basic code.
附件是错误快照,我尝试了在不同线程中列出的不同解决方法,尝试了命令行,尝试仅调用 avd,仍然是相同的错误.已安装 Android 11、10.
Attached is the error snapshot, I tried different workarounds listed in different threads, tried command line, tried to just invoke avd, still the same error. Has Android 11, 10 installed.
下面是错误
Process: qemu-system-x86_64 [2406]
Path: /Users/USER/Library/Android/*/qemu-system-x86_64
Identifier: qemu-system-x86_64
Version: 0
Code Type: X86-64 (Native)
Parent Process: studio [2380]
Responsible: qemu-system-x86_64 [2406]
User ID: 501
Date/Time: 2020-11-21 13:24:24.625 -0800
OS Version: Mac OS X 10.13.6 (17G14042)
Report Version: 12
Anonymous UUID: 3F92D280-01FC-0232-0678-BB15A8C21C4E
Sleep/Wake UUID: DC22FDA6-D97B-44DD-9541-89BE58B903F9
Time Awake Since Boot: 5300 seconds
Time Since Wake: 960 seconds
System Integrity Protection: enabled
Crashed Thread: 10
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray'
abort() called
terminating with uncaught exception of type NSException
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff297edf3b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff50b46942 objc_exception_throw + 48
2 CoreFoundation 0x00007fff298079ed -[__NSArray0 objectAtIndex:] + 93
3 libMoltenVK.dylib 0x000000011e9ef8a7
推荐答案
我遇到了完全相同的问题,我通过禁用硬件图形渲染来解决它.
I had the exact same problem and I solved it by disabling the hardware graphics rendering.
在 AVD 管理器中编辑虚拟设备的配置,选择显示高级设置";然后选择软件 - GLES 2.0";在图形选项列表中.
Edit the configuration of your virtual device in AVD manager, select "Show advanced settings" and then select "Software - GLES 2.0" in the option list for graphics.
请注意,这只是一种变通方法,而不是真正的解决方案,因为现在模拟器会运行但非常非常缓慢.
Note that it is only a work-around, not a real solution because now the emulator will run but very very slowly.
这篇关于带有 Android studio 4.1.1 的 AVD 在 mac OS High Sierra 上崩溃并出现错误“qemu-system-x86_64 意外退出"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!