Android emulator - unable to load driver(Android 模拟器 - 无法加载驱动程序)
问题描述
在 Ubuntu 上运行,我收到此错误:
Running on Ubuntu, I'm getting this error:
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 上.
Emulator image uses https://dl.google.com/android/repository/sys-img/google_apis/x86_64-24_r08.zip
and it's on Android N.
更新(2016 年 12 月 2 日):@Sébastien 的解决方案不再有效,但给出了:
Update (Dec 2, 2016): @Sébastien's solution no longer works but gives:
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 图形,则会出现以下运行时错误:
If I disable GPU based rendering and switch to software based GL graphics, there is this runtime error:
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
推荐答案
遇到了同样的问题,我的解决方法是设置以下环境变量:
Had the same issue and my fix was to set the following env variable:
导出 ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
在我的例子中,我把它放在 ~/.bashrc 中.随着发送,我像往常一样启动模拟器,即从命令行:
In my case I put it in ~/.bashrc. With that being sent I start emulator as usual, i.e. from command line:
$ 模拟器 -avd Nexus_4_API_23
$ emulator -avd Nexus_4_API_23
看起来这是 Android 错误跟踪器中跟踪的一个常见的众所周知的问题:https://code.google.com/p/android/issues/detail?id=197254
Looks like it's a common well-known problem tracked in Android bug tracker: https://code.google.com/p/android/issues/detail?id=197254
这篇关于Android 模拟器 - 无法加载驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android 模拟器 - 无法加载驱动程序
基础教程推荐
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01