Emulator: libGL error: unable to load driver: i965_dri.so

Emulator: libGL error: unable to load driver: i965_dri.so

在Deepin系统下使用Android Studio开发移动应用时,当使用模拟器调试时出现了以下报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
下午5:07	Emulator: libGL error: unable to load driver: i965_dri.so

下午5:07 Emulator: libGL error: driver pointer missing

下午5:07 Emulator: libGL error: failed to load driver: i965

下午5:07 Emulator: libGL error: unable to load driver: i965_dri.so

下午5:07 Emulator: libGL error: driver pointer missing

下午5:07 Emulator: libGL error: failed to load driver: i965

下午5:07 Emulator: libGL error: unable to load driver: swrast_dri.so

下午5:07 Emulator: libGL error: failed to load driver: swrast

下午5:07 Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)

下午5:07 Emulator: Major opcode of failed request: 156 (GLX)

下午5:07 Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)

下午5:07 Emulator: Value in failed request: 0x0

下午5:07 Emulator: Serial number of failed request: 64

下午5:07 Emulator: Current serial number in output stream: 65

下午5:07 Emulator: Process finished with exit code 1

别看报错这么多,其实原因只有一个:

Android Studio自带的stdc++库与系统自带的stdc++库产生了冲突

解决方案:

打开~/Android/Sdk/emulator/lib64/libstdc++删除该目录下的两个.so库文件即可