环境:

Deepin 15.5 + AndroidStudio 3.1.2

之前在LinuxMint进行Android开发,后来换了Deepin系统,于是重装AndroidStudio,打开Android虚拟机之后会报以下错误:

下午8:57	Emulator: libGL error: unable to load driver: i965_dri.so

下午8:57	Emulator: libGL error: driver pointer missing

下午8:57	Emulator: libGL error: failed to load driver: i965

下午8:57	Emulator: libGL error: unable to load driver: i965_dri.so

下午8:57	Emulator: libGL error: driver pointer missing

下午8:57	Emulator: libGL error: failed to load driver: i965

下午8:57	Emulator: libGL error: unable to load driver: swrast_dri.so

下午8:57	Emulator: libGL error: failed to load driver: swrast

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

下午8:57	Emulator: Major opcode of failed request:  155 (GLX)

下午8:57	Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)

下午8:57	Emulator: Value in failed request:  0x0

下午8:57	Emulator: Serial number of failed request:  64

下午8:57	Emulator: Current serial number in output stream:  65

下午8:57	Emulator: Process finished with exit code 1

这个问题应该是Android虚拟机依赖的so库和系统不匹配。于是我做了一个链接,问题就解决了

步骤1.首先进入到以下目录:

Sdk/emulator/lib64/libstdc++

我的目录如下:

步骤2. 修改原来文件的名称

mv libstdc++.so.6{,.bak}
mv libstdc++.so.6.0.19{,.bak}

步骤3. 设置系统库的软链接

ln -s /usr/lib/gcc/x86_64-linux-gnu/7/libstdc++.so 

现在可以看到当前目录下多出了一个链接文件,如下图:

再次打开Android虚拟机,已经可以正常打开了

Logo

更多推荐