Android工作室模拟器错误

时间:2017-12-02 19:05:51

标签: android android-studio

我在Ubuntu 17.10中安装了android studio,但是当我创建一个ADV并尝试启动它时,我收到了一堆错误,我已经在Google上搜索了,但我发现的解决方案都没有解决我的问题。

我已经安装了android studio网站要求的所有库

这是我收到的错误

16:52   Emulator: libGL error: unable to load driver: i965_dri.so
16:52   Emulator: libGL error: driver pointer missing
16:52   Emulator: libGL error: failed to load driver: i965
16:52   Emulator: libGL error: unable to load driver: swrast_dri.so
16:52   Emulator: libGL error: failed to load driver: swrast
16:52   Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)
16:52   Emulator: Major opcode of failed request:  152 (GLX)
16:52   Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)
16:52   Emulator: Value in failed request:  0x0
16:52   Emulator: Serial number of failed request:  31
16:52   Emulator: Current serial number in output stream:  32
16:52   Emulator: Process finished with exit code 1

1 个答案:

答案 0 :(得分:1)

此错误是由libstdc++ C ++运行时库

引起的

如果系统lib64stdc++6mesa-utils上没有以下软件包,您首先必须安装以下软件包

sudo apt-get install lib64stdc++6 mesa-utils

然后将库符号链接到android sdk工具路径

cd ~/Android/Sdk/tools/lib64/libstdc++
sudo mv libstdc++.so.6 libstdc++.so.6.og  ##making a copy of the file
sudo ln -s /usr/lib64/libstdc++.so.6 ~/Android/Sdk/tools/lib64/libstdc++

在许多情况下,libstdc++路径如下

~/Android/Sdk/emulator/lib64/libstdc++
sudo mv libstdc++.so.6 libstdc++.so.6.og 
sudo ln -s /usr/lib64/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++

我希望它为你工作。

相关问题