【问题标题】:Android: the emulator process for AVD was killedAndroid:AVD的模拟器进程被杀死
【发布时间】:2020-12-04 17:45:30
【问题描述】:

我在 Virtual box 来宾操作系统 (Ubuntu 20.04.1) 中运行 Android Studio。来宾操作系统具有 4 个处理器内核和 8 GB RAM。 KVM 已启用:

$ egrep -c '(vmx|svm)' /proc/cpuinfo
4
$ kvm-ok
INFO: /dev/kvm exists 
KVM acceleration can be used

Android Studio 中的事件日志为空,在控制台中我看到以下内容: Emulator terminated with exit code 139。我找到了几篇使用此类代码的帖子,并将Emulate performance graphicsVM Heap sizeSoftware 设置为512 MB,但没有任何效果。

【问题讨论】:

    标签: android ubuntu virtualbox


    【解决方案1】:

    您找到解决方案了吗?对我来说,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。 有了这个版本,模拟器又可以正常工作了。

    【讨论】:

      猜你喜欢
      • 2021-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-21
      相关资源
      最近更新 更多