我无法启动我的安卓模拟器.似乎没有加载任何内容.
I'm having trouble starting my android emulator. Nothing appears to load.
像素 2 API 26 Android 8.0 x86.
Pixel 2 API 26 Android 8.0 x86.
Linux Ubuntu 16.04 LTS 64 位.
Linux Ubuntu 16.04 LTS 64-bit.
12/10/17 下午 2:20 模拟器:libGL 错误:无法加载驱动程序:vmwgfx_dri.so
12/10/17 2:20 PM Emulator: libGL error: unable to load driver: vmwgfx_dri.so
下午 2:20 模拟器:libGL 错误:缺少驱动程序指针
2:20 PM Emulator: libGL error: driver pointer missing
下午 2:20 模拟器:libGL 错误:无法加载驱动程序:vmwgfx
2:20 PM Emulator: libGL error: failed to load driver: vmwgfx
下午 2:20 模拟器:libGL 错误:无法加载驱动程序:swrast_dri.so
2:20 PM Emulator: libGL error: unable to load driver: swrast_dri.so
下午 2:20 模拟器:libGL 错误:加载驱动程序失败:swrast
2:20 PM Emulator: libGL error: failed to load driver: swrast
2:20 PM 模拟器:X 请求失败错误:BadValue(整数参数超出操作范围)
2:20 PM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
2:20 PM 模拟器:失败请求的主要操作码:155 (GLX)
2:20 PM Emulator: Major opcode of failed request: 155 (GLX)
2:20 PM 模拟器:失败请求的次要操作码:24(X_GLXCreateNewContext)
2:20 PM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
2:20 PM 模拟器:失败请求中的值:0x0
2:20 PM Emulator: Value in failed request: 0x0
2:20 PM 模拟器:失败请求的序列号:33
2:20 PM Emulator: Serial number of failed request: 33
2:20 PM 模拟器:输出流中的当前序列号:34
2:20 PM Emulator: Current serial number in output stream: 34
2:20 PM 模拟器:进程以退出代码 1 结束
2:20 PM Emulator: Process finished with exit code 1
这些是来自 libGL 和 libstdc++
您可以通过在 AVD 设置中将 Software
更改为 Emulated Performance Graphics
选项来快速解决此问题.
You can quick fix this by change to use Software
for Emulated Performance Graphics
option, in the AVD settings.
或者尝试使用 libstdc++.so.6
(在您的系统中可用)而不是捆绑在 Android SDK 中的那个.有两种替换方式:
Or try to use the libstdc++.so.6
(which is available in your system) instead of the one bundled inside Android SDK. There are 2 ways to replace it:
模拟器有一个开关-use-system-libs
.你可以在这里找到它:~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs
.
The emulator has a switch -use-system-libs
. You can found it here: ~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs
.
此选项强制 Linux 模拟器加载系统 libstdc++
(但不是 Qt 库),如果捆绑的(来自 Android SDK)阻止它加载或正常工作.请参阅此提交
This option force Linux emulator to load the system libstdc++
(but not Qt libraries),
in cases where the bundled ones (from Android SDK) prevent it from loading or
working correctly. See this commit
或者,您可以为您的 user/system
将 ANDROID_EMULATOR_USE_SYSTEM_LIBS
环境变量设置为 1
.
Alternatively you can set the ANDROID_EMULATOR_USE_SYSTEM_LIBS
environment variable to 1
for your user/system
.
这样做的好处是确保模拟器能够正常工作如果您从 Android Studio 中启动它.
This has the benefit of making sure that the emulator will work even if you launched it from within Android Studio.
请参阅: libGL 错误和 libstdc++:无法在模拟器中启动 AVD- 问题跟踪器
这篇关于Android Studio AVD - 模拟器:进程以退出代码 1 完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!