首页 > 解决方案 > 在Linux(Ubuntu)中按下Power,Vllume up,More等模拟器按钮后,Android Emulator停止工作

问题描述

在我的系统(ubuntu)中,当我按下任何模拟器按钮时,它会崩溃。

在此处输入图像描述

按下按钮电源按钮后 在此处输入图像描述

在此处输入图像描述

标签: androidlinuxubuntuandroid-emulatorandroid-studio-4.1

解决方案


像这样使用它

模拟性能::图形:硬件

Emulated-Performance:: Boot Option:冷启动

Emulated-Performance:: Multi-Core: 4 (max on my system)

如果软件选项未显示,则编辑 AVD 的 config.ini 文件。在 Linux 下,它位于/home/<user>/.android/avd/<AVD-name>/config.ini(在我的情况下是Nexus_5X_API_29.avd)下。

在文本编辑器中更改行

hw.gpu.enabled=no
hw.gpu.mode=auto

要么

hw.gpu.enabled=no
hw.gpu.mode=off

或者

hw.gpu.enabled=yes
hw.gpu.mode=host

即使在 Android Studio 的 Android 虚拟设备管理器中打开此设置,该设置也会保留。它只是在那里不可编辑。

我也试过这个,我在另一个 AVD 中找到了这个:

hw.gpu.enabled=yes
hw.gpu.mode=software

推荐阅读