问题
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.
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.
Below is the error
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
Error
回答1:
I had the exact same problem and I solved it by disabling the hardware graphics rendering.
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.
changing the option for graphic rendering in AVD manager
来源:https://stackoverflow.com/questions/64949403/avd-with-android-studio-4-1-1-crashing-on-mac-os-high-sierra-with-error-qemu-sy