您找到解决方案了吗?对我来说,Android Studio 日志中出现了以下内容:
2021-05-04 15:46:31,027 [79014767] INFO - manager.EmulatorProcessHandler - Emulator: /home/aj/Android/Sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_3a_XL_API_30
2021-05-04 15:46:31,248 [79014988] INFO - manager.EmulatorProcessHandler - Emulator: handleCpuAcceleration: feature check for hvf
2021-05-04 15:46:31,336 [79015076] INFO - manager.EmulatorProcessHandler - Emulator: cannot add library /home/aj/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
2021-05-04 15:46:31,336 [79015076] INFO - manager.EmulatorProcessHandler - Emulator: added library /home/aj/Android/Sdk/emulator/lib64/vulkan/libvulkan.so
2021-05-04 15:46:31,336 [79015076] INFO - manager.EmulatorProcessHandler - Emulator: cannot add library /home/aj/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full
2021-05-04 15:46:31,394 [79015134] INFO - manager.EmulatorProcessHandler - Emulator: INTEL-MESA: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
2021-05-04 15:46:31,394 [79015134] INFO - manager.EmulatorProcessHandler - Emulator:
2021-05-04 15:46:31,630 [79015370] INFO - manager.EmulatorProcessHandler - Emulator: emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: /run/user/1000/avd/running/pid_435941.ini
2021-05-04 15:46:44,682 [79028422] INFO - manager.EmulatorProcessHandler - Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
2021-05-04 15:46:44,682 [79028422] WARN - manager.EmulatorProcessHandler - Emulator terminated with exit code 139
我会继续调查,我认为最近的 Ubuntu 更新可能有问题。
编辑:没关系,我找到了解决我的具体问题的方法:
我正在测试另一个名为 tivi 的项目,它依赖于 Android Studio Canary 并在模拟器中启动它,必须也将模拟器更新为 canary-version(版本 30.6.x)。
之后,我回到我在 Android Studio 稳定版中的常规应用程序项目并尝试使用任何模拟器图像,它总是给出关于“模拟器进程被终止”的通用错误消息和上面的日志消息。
我删除了所有没有帮助的模拟器图像。
但刚才我尝试从 SDK 管理器重新安装 android-emulator 包。然后它为 AS-stable 安装了正确的版本:30.5.5。
有了这个版本,模拟器又可以正常工作了。