Android Studio AVD-模拟器:流程结束,退出代码为1 [英] Android Studio AVD - Emulator: Process finished with exit code 1

查看:482
本文介绍了Android Studio AVD-模拟器:流程结束,退出代码为1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在启动我的Android模拟器时遇到问题.似乎没有任何加载.

I'm having trouble starting my android emulator. Nothing appears to load.

Pixel 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.

17年12月10日下午20:20模拟器:libGL错误:无法加载驱动程序: vmwgfx_dri.so

12/10/17 2:20 PM Emulator: libGL error: unable to load driver: vmwgfx_dri.so

2:20 PM模拟器:libGL错误:驱动程序指针丢失

2:20 PM Emulator: libGL error: driver pointer missing

2:20 PM模拟器:libGL错误:无法加载驱动程序:vmwgfx

2:20 PM Emulator: libGL error: failed to load driver: vmwgfx

2:20 PM模拟器:libGL错误:无法加载驱动程序:swrast_dri.so

2:20 PM Emulator: libGL error: unable to load driver: swrast_dri.so

2:20 PM模拟器: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设置中更改为Emulated Performance Graphics选项使用Software来快速解决此问题.

You can quick fix this by change to use Software for Emulated Performance Graphics option, in the AVD settings.

或者尝试使用libstdc++.so.6(在系统中可用),而不要使用Android SDK中捆绑的libstdc++.so.6.有两种替换方法:

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/systemANDROID_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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆