在Ubuntu16.10 上启动Android 自带的模拟器报错错误信息如下:
/opt/androidsdk/tools/emulator -netdelay none -netspeed full -avd Android_TV1080_22 libGL error: unable to load driver: i965_dri.so Note: The environment variable $ANDROID_SDK_HOME is set,and the emulator uses that variable to locate AVDs. This may result in the emulator failing to start if it cannot find the AVDs in the folder pointed to by the given environment variable. ANDROID_SDK_HOME=/opt/androidsdk libGL error: driver pointer missing libGL error: Failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: Failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: Failed to load driver: swrast X Error of Failed request: GLXBadContext Major opcode of Failed request: 155 (GLX) Minor opcode of Failed request: 6 (X_GLXIsDirect) Serial number of Failed request: 55 Current serial number in output stream: 54 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: Failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: Failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: Failed to load driver: swrast X Error of Failed request: GLXBadContext Major opcode of Failed request: 155 (GLX) Minor opcode of Failed request: 6 (X_GLXIsDirect) Serial number of Failed request: 55 Current serial number in output stream: 54 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: Failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: Failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: Failed to load driver: swrast X Error of Failed request: BadValue (integer parameter out of range for operation) Major opcode of Failed request: 155 (GLX) Minor opcode of Failed request: 24 (X_GLXCreateNewContext) Value in Failed request: 0x0 Serial number of Failed request: 39 Current serial number in output stream: 40 QObject::~QObject: Timers cannot be stopped from another thread
百度直译 如下:
- /选择/ SDK /工具/模拟器- netdelay非netspeed全AVD android_tv1080_22 libgl错误:无法加载驱动程序:i965_dri.so 注:环境变量$ android_sdk_home设置和模拟器使用变量来定位AVDs。 这可能会导致模拟器无法启动如果它不能在文件夹中查找AVDS指出的 给定环境变量。 android_sdk_home = /选择/ SDK libgl错误:驱动指针丢失 libgl错误:无法加载驱动程序:i965 libgl错误:无法加载驱动程序:i965_dri.so libgl错误:驱动指针丢失 libgl错误:无法加载驱动程序:i965 libgl错误:无法加载驱动程序:swrast_dri.so libgl错误:无法加载驱动程序:swrast 失败的请求X错误:GLXBadContext 失败的请求大码:155(GLX) 失败的请求小码:6(x_glxisdirect) 失败的请求的序列号:55 当前序列号在输出流:54 libgl错误:无法加载驱动程序:i965_dri.so libgl错误:驱动指针丢失 libgl错误:无法加载驱动程序:i965 libgl错误:无法加载驱动程序:i965_dri.so libgl错误:驱动指针丢失 libgl错误:无法加载驱动程序:i965 libgl错误:无法加载驱动程序:swrast_dri.so libgl错误:无法加载驱动程序:swrast 失败的请求X错误:GLXBadContext 失败的请求大码:155(GLX) 失败的请求小码:6(x_glxisdirect) 失败的请求的序列号:55 当前序列号在输出流:54 libgl错误:无法加载驱动程序:i965_dri.so libgl错误:驱动指针丢失 libgl错误:无法加载驱动程序:i965 libgl错误:无法加载驱动程序:i965_dri.so libgl错误:驱动指针丢失 libgl错误:无法加载驱动程序:i965 libgl错误:无法加载驱动程序:swrast_dri.so libgl错误:无法加载驱动程序:swrast 失败的请求X错误:BadValue(整数的参数范围内运行) 失败的请求大码:155(GLX) 失败的请求小码:24(x_glxcreatenewcontext) 在失败的请求值:0x0 失败的请求的序列号:39 当前序列号在输出流:40 QObject::~ QObject:定时器不能阻止另一个线程
sudo apt-get install lib64stdc++6
进入tools/lib64/libstdc++ 文件夹
cd $ANDROID_SDK_HOME/tools/lib64/libstdc++
备份已有的libstdc++.so.6 文件
mv libstdc++.so.6 libstdc++.so.6.bak
对刚刚装的库文件 创建软连接
ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/Sdk/tools/lib64/libstdc++
最后启动模拟器 ok 搞定。
原文链接:/ubuntu/354371.html