Android emulator-无法加载驱动程序

Android emulator-无法加载驱动程序,android,linux,android-emulator,Android,Linux,Android Emulator,在Ubuntu上运行时,我遇到以下错误: Cannot launch AVD in emulator. Output: 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: fa

在Ubuntu上运行时,我遇到以下错误:

Cannot launch AVD in emulator.
Output:
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
平台工具是最新的

仿真器映像使用
https://dl.google.com/android/repository/sys-img/google_apis/x86_64-24_r08.zip
而且它在安卓N上

更新(2016年12月2日):@Sébastien的解决方案不再有效,但提供:

Cannot launch AVD in emulator.
Output:
failed to create drawable
getGLES2ExtensionString: Could not create GLES 2.x Pbuffer!
Failed to obtain GLES 2.x extensions string!
Could not initialize emulated framebuffer
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
emulator: WARNING: ./android/metrics/metrics_reporter.cpp:142: Failed to get a writable, unused path for metrics. Tried: /home/me/.android/avd/metrics/metrics.17386.yogibear
如果禁用基于GPU的渲染并切换到基于软件的GL图形,则会出现以下运行时错误:

Firebase API initialization failure.
               DeadSystemException: The system died; earlier logs will point to the root cause
FATAL EXCEPTION: main
                  Process: com.whatever.mobile, PID: 4501
                  DeadSystemException: The system died; earlier logs will point to the root cause

我刚刚遇到了同样的错误,简单地删除
$ANDROID\u HOME/tools/lib64/libstdc++/*
对我来说很有效。16.10(6.0.22)附带的libstdc++版本比sdk工具附带的版本(6.0.18)更高,我想它会与其他库产生冲突。

也有同样的问题,我的解决方案是设置以下env变量:

导出ANDROID\u模拟器\u使用\u系统\u LIBS=1

在我的例子中,我把它放在~/.bashrc中。 发送后,我会像往常一样启动emulator,即从命令行:

$emulator-avd Nexus_4_API_23


看起来这是Android bug tracker中跟踪到的一个常见的众所周知的问题:

该问题与lIBMTDC++有关。因此.6转到Android SDK,可以通过以下命令解决:

cd ~/...../sdk/tools/lib64/libstdc++
mv libstdc++.so.6 libstdc++.so.6_OLD
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

信用证:

我一直在努力解决这个问题,答案是正确的,只是应用方法花了我很多时间才弄明白:

(作为Root)我已经运行了:找到libstdc++.so.6

然后是当前库的结果列表,其中包含版本和位置
我将mv/rm应用于Android SDK附带的版本(~/Android/SDK/emulator/lib/libstdc++/libstdc++.so.6,在我的例子中),然后从系统版本中创建一个链接(/usr/lib/i386 linux gnu/libstdc++.so.6或/usr/lib/x86_64-linux-gnu/libstdc++.so.6或/usr/lib32/libstdc++.so.6,取决于您的系统)

您是否在“裸机”上运行Yakkety(即非虚拟)?您是否尝试过重建/重新安装英特尔VGA驱动程序(内核模块)?Yakkety几天前发布(截至2016年10月16日),您可能需要等待一段时间。我没有搞乱内核模块,因为所有其他应用都可以正常工作。尝试重建内核模块(因为i965和swrast肯定指向英特尔VGA“驱动程序”,但可能是错误的)。你应该谷歌(作为一个选项,在askubuntu内)关于内核模块重建的选项。不幸的是,这不是我的专业领域。可能是Android emulator还不支持Yakkety。不过,我几乎可以肯定它对特定的操作系统支持一无所知(Android没有意识到这一点)但是更多关于缺乏特定内核模块的内容对不起,我不能向您介绍一些特定的方向,但我希望您已经了解了它的基本概念。(AVD基于QEmu,但我相信您已经意识到了这一点)我觉得您确实使用了AndroidStudio的AVD(就像我一直做的那样)。从头开始重建一个AVD可以解决这个问题(但我帮不了你),或者等几天再由维护人员重建也能帮上忙。毕竟Yakkety是在不到5天前发布的)这不再有效,更新了我的问题。有什么新的解决方法吗?这并不能解决它。模拟器仍然会因为错误而自杀
getGLES2ExtensionString:无法创建GLES 2.x Pbuffer!
需要切换到基于软件的渲染。在Ubuntu 18.04上,我必须将
导出ANDROID_emulator_USE_SYSTEM_LIBS=1
放在
~/.profil中e
,以便Android Studio能够获取它。