在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
,它在Android 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
有同样的问题,我的解决方法是设置以下env变量:
导出ANDROID_EMULATOR_USE_SYSTEM_LIBS = 1
就我而言,我将其放在〜/ .bashrc中。发送该代码后,我照常启动仿真器,即从命令行启动:
$模拟器-avd Nexus_4_API_23
看起来这是在Android错误跟踪器中跟踪到的一个常见的常见问题:https : //code.google.com/p/android/issues/detail? id =197254
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句