刚刚更新到Android Studio 4.2.1在Mac上,现在模拟器不再工作

mwngjboj  于 2022-12-21  发布在  Android
关注(0)|答案(8)|浏览(127)

我刚刚更新Android Studio到其最新版本4.2.1和模拟器停止工作。每次我尝试启动一个新的虚拟设备,它崩溃和AVD管理器显示我这个错误:
“AVD Pixel_C_API_30的模拟器进程已终止”
以下是我迄今为止尝试过的方法:
1.冷 Boot 重新启动。
1.已在AVD管理器中删除并重新创建虚拟设备。
1.已删除并重新安装模拟器SDK包(版本30.7.4)
1.退出并重新启动Android Studio以及模拟器。
1.从头开始创建新的虚拟设备。
1.已尝试多个不同的虚拟设备。
以上所有这些都给了我一个完全相同的结果:模拟器崩溃,AVD管理器显示上述错误。
这里是我从MacOS得到的错误(只是它的摘录):

Process:               qemu-system-x86_64 [25489]
Path:                  /Applications/AndroidSDK/*/qemu-system-x86_64
Identifier:            qemu-system-x86_64
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        studio [24338]
Responsible:           studio [24338]
User ID:               503

Date/Time:             2021-06-23 15:10:43.330 -0700
OS Version:            Mac OS X 10.15.6 (19G2021)
Report Version:        12
Anonymous UUID:        CA586B3B-F518-2387-5DB1-1CA2D33288CD

Time Awake Since Boot: 33000 seconds

System Integrity Protection: disabled

Crashed Thread:        17

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x4] Symbol missing

Dyld Error Message:
  Symbol not found: _preadv
  Referenced from: /Applications/AndroidSDK/*/qemu-system-x86_64
  Expected in: /usr/lib/libSystem.B.dylib

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff713f7dfa mach_msg_trap + 10
[...]

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 37606
    thread_create: 0
    thread_set_state: 2070

VM Region Summary:
ReadOnly portion of Libraries: Total=977.4M resident=0K(0%) swapped_out_or_unallocated=977.4M(100%)
Writable regions: Total=2.0G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.0G(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               128K        1 
Activity Tracing                   256K        1 
CG backing stores                  440K        2 
CG image                            68K        1 
CoreAnimation                     5396K        5 
CoreGraphics                         8K        1 
CoreImage                            8K        2 
CoreServices                      11.4M        2 
Dispatch continuations            48.0M        1 
Foundation                           4K        1 
IOKit                              128K        2 
Kernel Alloc Once                    8K        1 
MALLOC                           468.8M       94 
MALLOC guard page                   48K        9 
MALLOC_LARGE (reserved)           9000K        1         reserved VM address space (unallocated)
MALLOC_MEDIUM (reserved)           1.3G       12         reserved VM address space (unallocated)
OpenGL GLSL                        256K        3 
PROTECTED_MEMORY                     4K        1 
STACK GUARD                       56.1M       36 
Stack                             25.8M       39 
VM_ALLOCATE                       53.8M      144 
__DATA                            64.9M      418 
__DATA_CONST                        76K        2 
__FONT_DATA                          4K        1 
__GLSLBUILTINS                    5176K        1 
__LINKEDIT                       530.2M       48 
__OBJC_RO                         32.3M        1 
__OBJC_RW                         1908K        2 
__TEXT                           447.3M      401 
__UNICODE                          564K        1 
mapped file                        2.1G       21 
shared memory                      640K       15 
===========                     =======  ======= 
TOTAL                              5.1G     1270 
TOTAL, minus reserved VM space     3.8G     1270 

Model: MacPro5,1, BootROM 141.0.0.0.0, 12 processors, 6-Core Intel Xeon, 3.33 GHz, 48 GB, SMC 1.39f5
Graphics: kHW_AMDRadeonRX580Item, Radeon RX 580, spdisplays_pcie_device, 8 GB
Memory Module: DIMM 1, 8 GB, DDR3 ECC, 1333 MHz, 0x80CE, 0x4D33393342314B37304248312D4348392020
Memory Module: DIMM 2, 8 GB, DDR3 ECC, 1333 MHz, 0x80CE, 0x4D33393342314B37304248312D4348392020
Memory Module: DIMM 3, 8 GB, DDR3 ECC, 1333 MHz, 0x80CE, 0x4D33393342314B37304248312D4348392020
Memory Module: DIMM 5, 8 GB, DDR3 ECC, 1333 MHz, 0x80CE, 0x4D33393342314B37304248312D4348392020
Memory Module: DIMM 6, 8 GB, DDR3 ECC, 1333 MHz, 0x80CE, 0x4D33393342314B37304248312D4348392020
Memory Module: DIMM 7, 8 GB, DDR3 ECC, 1333 MHz, 0x80CE, 0x4D33393342314B37304248312D4348392020
Bluetooth: Version 7.0.6f7, 3 services, 27 devices, 1 incoming serial ports
Network Service: Ethernet 1, Ethernet, en0
PCI Card: Radeon RX 580, sppci_displaycontroller, Slot-1
PCI Card: pci8086,f1a8, sppci_nvme, Slot-2
PCI Card: pci1002,aaf0, sppci_audiodevice, Slot-1
PCI Card: pci144d,a808, sppci_nvme, Slot-4
PCI Card: PXS3, sppci_usbxhci, Slot-3
Serial ATA Device: HL-DT-ST DVD-RW GH41N
Serial ATA Device: HL-DT-ST BD-RE  WH16NS40
Serial ATA Device: ST4000DM004-2CV104, 4 TB
Serial ATA Device: ST3000DM001-1ER166, 3 TB
Serial ATA Device: ST4000DM004-2CV104, 4 TB
Serial ATA Device: WDC WD1002FAEX-00Y9A0, 1 TB
USB Device: USB 3.0 Bus
USB Device: USB3.1 Hub
USB Device: USB3.1 Hub
USB Device: USB2.1 Hub
USB Device: ProtectExecuter
USB Device: Hub
USB Device: USB2.1 Hub
USB Device: USB Audio Device
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Apple Cinema HD Display
USB Device: USB 2.0 Bus
USB Device: Keyboard Hub
USB Device: Macally BUMPERMOUSE
USB Device: Apple Keyboard
USB Device: USB Bus
USB Device: Logitech USB Headset
USB Device: USB Bus
USB Device: USB Bus
USB Device: USB Bus
USB Device: USB Bus
USB Device: USB Bus
USB Device: BRCM2046 Hub
USB Device: Bluetooth USB Host Controller
FireWire Device: built-in_hub, Up to 800 Mb/sec
FireWire Device: unknown_device, Unknown
FireWire Device: unknown_device, Unknown
Thunderbolt Bus:

我在MacOS 10.15.6上,Android Studio版本4.2.1,运行时版本:11.0.8+10-字节944.6916264 x86_64
更新:我尝试从终端启动它,如下所示:

./emulator -avd Pixel_C_API_30

在它崩溃之前我得到了以下输出:

emulator: Android emulator version 30.7.4.0 (build_id 7453540) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library /Applications/AndroidSDK/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
added library /Applications/AndroidSDK/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library /Applications/AndroidSDK/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
added library /Applications/AndroidSDK/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: /Volumes/DocumentsNew/Users/fabrizio/Library/Caches/TemporaryItems/avd/running/pid_2344.ini
dyld: lazy symbol binding failed: Symbol not found: _pwritev
  Referenced from: /Applications/AndroidSDK/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _pwritev
  Referenced from: /Applications/AndroidSDK/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
  Expected in: /usr/lib/libSystem.B.dylib

Abort
dy1byipe

dy1byipe1#

所有的答案都太混乱了,无法遵循。更换SDK或升级OS。我发现的最快方法是:
工具〉SDK管理器〉SDK工具
取消选择Android模拟器,然后单击应用。-Android模拟器将被删除。
现在,默认情况下显示的模拟器版本为30.6.5。选中复选框并单击应用。将安装此版本的模拟器。
就这样,就占用你两分钟时间。
更新:2021年7月1日使用最新模拟器版本30.7.5解决了问题

2skhul33

2skhul332#

我也遇到过同样的错误。这是由Android Emulator 30.7.4与macOS Catalina 结合造成的。您可以在此处跟踪该问题

对我有用的工作是升级到大苏尔。

myzjeezk

myzjeezk3#

我手动恢复到30.6.5,它再次工作。

f4t66c6m

f4t66c6m4#

你必须降级 Catalina 的模拟器
1.下载模拟器30.7.3
1.解压缩模拟器-达尔文_x64 - 7425822.zip
1.执行命令“xattr -rc *”以删除所有扩展属性
1.替换模拟器文件夹(/Users/xxx/Library/Android/sdk)
1.将package.xml修改为<revision><major>30</major><minor>7</minor><micro>3</micro></revision>

xn1cxnb4

xn1cxnb45#

您可以下载模拟器并将其放置到SDK文件夹中。它为我工作。在这里我找到了文件。如何下载Android模拟器而不使用Android Studio

svgewumm

svgewumm6#

在此链接的帮助下,能够将版本降级到v30.6.5;现在可以运行模拟器

7ivaypg9

7ivaypg97#

我将版本降级到v30.9.4,但仍然出现错误:“AVD xxx的模拟器进程已终止”
然后我发现我可以通过命令行启动模拟器:

cd /Users/jinlei/Library/Android/sdk/emulator
./emulator -list-avds
./emulator -avd Pixel_2_API_Sv2

但从IDE启动时,仍然出现此错误。

ckx4rj1h

ckx4rj1h8#

Google提供的降级模拟器的官方渠道可访问
https://developer.android.com/studio/emulator_archive
跟踪模拟器版本的更改,请访问
https://developer.android.com/studio/releases/emulator

相关问题