当我在android studio 3 canary 6中运行模拟器时出现此错误:
Emulator: libGL error: unable to load driver: r600_dri.so
Emulator: libGL error: driver pointer missing
Emulator: libGL error: failed to load driver: r600
Emulator: libGL error: unable to load driver: swrast_dri.so
Emulator: libGL error: failed to load driver: swrast
Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
Emulator: Major opcode of failed request: 155 (GLX)
Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Emulator: Value in failed request: 0x0
Emulator: Serial number of failed request: 33
Emulator: Current serial number in output stream: 34
Emulator: Process finished with exit code 1
但是当我通过终端~/Android/Sdk/tools/emulator -avd (put name device) -use-system-libs
命令模拟器时,它可以正常工作。
我不知道如何让它从Android工作室运行。
答案 0 :(得分:1)
您可以设置环境变量ANDROID_EMULATOR_USE_SYSTEM_LIBS = 1以强制执行与-use-system-libs选项相同的行为。
一种简单的方法是将桌面文件从/usr/share/applications/android-studio-canary.desktop复制到〜/ .local / share / applications / android-studio-canary.desktop并更改“Exec”这样的行:
Exec=env ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 LANG=C android-studio-canary %f
(我还设置了LANG = C,因为使用我的本地语言环境设置,XML文件中的浮点数被解释错误)