android - 启动 Android 模拟器失败 : QXcbConnection: Could not connect to display

标签 android

我想在没有显示器的远程服务器上进行一些调试(没有 GUI 的 Android native 程序)。

命令是:

./emulator -writable-system -avd Pixel_XL_API_25 -no-snapshot-load -qemu -no-skin -no-audio -no-window  -v

错误信息:

emulator: WARNING: System image is writable
QXcbConnection: Could not connect to display
Aborted

我有 -no-window 选项为什么它仍然尝试连接到显示器? 我通过互联网搜索。看起来这是一个 QT 错误。想绕着它转转吗?

我尝试通过 export DISPLAY=:0 设置 DISPLAY env var。这是行不通的。

最佳答案

export DISPLAY=:0

适用于 Ubuntu 18.04 删除 android studio 并从 Ubuntu 软件商店重新安装也为我解决了。

关于android - 启动 Android 模拟器失败 : QXcbConnection: Could not connect to display,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49195617/

相关文章:

android - 为什么我不能运行我的应用程序?

android - 列表未刷新

android - 基于2个字段通过contentProvider批量插入/更新

android - 进行 react native 链接时出现错误

Java:无法将字符串转换为数组

java - android中如何显示已安装的应用程序?

android - Google cardboard for unity 在 Android 设备上禁用 AA

android - fragmentTransaction.add() 方法问题

android - flutter 本地通知 : what's the channel id?

Android - 即使父进程被杀死也保持服务 Activity