Android Studio 模拟器:emulator64-crash-service 意外退出
Posted
技术标签:
【中文标题】Android Studio 模拟器:emulator64-crash-service 意外退出【英文标题】:Android Studio Emulator: emulator64-crash-service quit unexpectedly 【发布时间】:2021-04-25 19:04:57 【问题描述】:配置
我有一台运行 macOS Big Sur 11.1
的 Macbook Pro (Retina,13 英寸,2016 年)错误报告
Android Studio 总是导致崩溃(emulator64-crash-service 意外退出。)
在升级到 macOS Big Sur 之前,android Emulator 运行良好。但自从我升级操作系统后,Android 模拟器总是崩溃。
同时使用 Android Studio 和终端中的 AVD 管理器,AVD 崩溃并显示以下日志:
./emulator -netdelay none -netspeed full -avd Pixel_API_28
emulator: Android emulator version 30.3.5.0 (build_id 7033400) (CL:N/A)
handleCpuAcceleration: feature check for hvf
emulator: WARNING: Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
2021-01-21 11:51:29.242 qemu-system-x86_64[17602:214627] ApplePersistence=YES
程序在没有任何额外日志的情况下退出,因此无法确定根本原因。
然后,打开一个问题报告,指出 emulator64-crash-service 意外退出
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [17603]
VM Regions Near 0:
-->
__TEXT 10f359000-1103a1000 [ 16.3M] r-x/rwx SM=COW /Users/*/Library/Android/*
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libdispatch.dylib 0x00007fff201afaa6 dispatch_release + 4
1 com.apple.AppKit 0x00007fff236b66df -[NSPersistentUIManager dealloc] + 37
2 com.apple.AppKit 0x00007fff22c72880 -[NSPersistentUIManager initWithBundleID:] + 384
3 com.apple.Foundation 0x00007fff2118a04c _NSFaultInObject + 27
4 com.apple.HIToolbox 0x00007fff286c8ba9 _HIPersistentUICreatePersistentWindow + 46
5 com.apple.HIToolbox 0x00007fff286c8aba WindowStateSetMenuBarState(unsigned int, double, void const*) + 43
6 com.apple.HIToolbox 0x00007fff286b8ee5 MBWindows::CreateWindow(CGRect, unsigned int) + 373
7 com.apple.HIToolbox 0x00007fff286b8c69 MBWindows::GetWindowOnDisplay(unsigned int, unsigned char) + 183
8 com.apple.HIToolbox 0x00007fff286b8abd MenuBarInstance::ForEachWindowDo(unsigned char, bool (OpaqueWindowPtr*, unsigned int) block_pointer) + 183
9 com.apple.HIToolbox 0x00007fff286b89c3 MenuBarInstance::SetBoundsAndUpdateResolution() + 103
10 com.apple.HIToolbox 0x00007fff286b8571 MenuBarInstance::Show(MenuBarAnimationStyle, unsigned char, unsigned char, unsigned char, unsigned char) + 275
11 com.apple.HIToolbox 0x00007fff286b7fb8 MenuBarInstance::UpdateAggregateUIMode(MenuBarAnimationStyle, unsigned char, unsigned char, unsigned char) + 798
12 com.apple.HIToolbox 0x00007fff286b7bba MenuBarInstance::ForEachMenuBarDo(void (MenuBarInstance*) block_pointer) + 46
13 com.apple.HIToolbox 0x00007fff286b7b5a UpdateAllAggregateUIModes(MenuBarAnimationStyle, unsigned char) + 126
14 com.apple.HIToolbox 0x00007fff286b7ac6 SetSystemUIMode + 165
15 com.apple.AppKit 0x00007fff22fee43b -[NSApplication _setPresentationOptions:instance:flags:] + 1010
16 libqcocoa.dylib 0x00000001133bfc14 QCocoaIntegration::QCocoaIntegration(QStringList const&) + 1796
17 libqcocoa.dylib 0x00000001133bf23e QCocoaIntegrationPlugin::create(QString const&, QStringList const&) + 78
18 libQt5GuiAndroidEmu.5.12.1.dylib 0x0000000111c79c26 QPlatformIntegrationFactory::create(QString const&, QStringList const&, int&, char**, QString const&) + 198
19 libQt5GuiAndroidEmu.5.12.1.dylib 0x0000000111c85d69 QGuiApplicationPrivate::createPlatformIntegration() + 2473
20 libQt5GuiAndroidEmu.5.12.1.dylib 0x0000000111c8707b QGuiApplicationPrivate::createEventDispatcher() + 27
21 libQt5CoreAndroidEmu.5.12.1.dylib 0x000000011169e74f QCoreApplicationPrivate::init() + 1567
22 libQt5GuiAndroidEmu.5.12.1.dylib 0x0000000111c823c9 QGuiApplicationPrivate::init() + 57
23 libQt5WidgetsAndroidEmu.5.12.1.dylib 0x000000011238a4ba QApplicationPrivate::init() + 26
24 emulator64-crash-service 0x000000010f361ec5 main + 1285
25 libdyld.dylib 0x00007fff20376621 start + 1
Thread 1:
0 libsystem_pthread.dylib 0x00007fff20357458 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00007fff20357458 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x011dffff8839de21 rbx: 0x00007f930b53ab10 rcx: 0x0080000000000000 rdx: 0x0100000000000000
rdi: 0x0000000000000000 rsi: 0x00007fff7c59fd2c rbp: 0x00007ffee08a5480 rsp: 0x00007ffee08a5480
r8: 0x00000000000036be r9: 0x00000000000036c2 r10: 0x00007fff8839de22 r11: 0x00007fff236b66ba
r12: 0x0000000000000e6c r13: 0x00007f930b523720 r14: 0x00007fff201f99a0 r15: 0x0000000000000000
rip: 0x00007fff201afaa6 rfl: 0x0000000000010246 cr2: 0x0000000000000000
Logical CPU: 2
Error Code: 0x00000004 (no mapping for user data read)
Trap Number: 14
我在 Qt 或 Qemu 中查找了可能的问题,但我不知道这里的问题是什么以及它与 MacOS Big Sur 的关系
我尝试卸载并重新安装:
Android 工作室 英特尔 x86 仿真器加速器(HAXM 安装程序)我还尝试擦除数据并冷启动 AVD
请告知最近是否有人遇到过此问题
【问题讨论】:
【参考方案1】:尝试删除 Android 缓存目录
/Users/[用户帐户名]/.android
【讨论】:
以上是关于Android Studio 模拟器:emulator64-crash-service 意外退出的主要内容,如果未能解决你的问题,请参考以下文章