Android Studio AVD - 模拟器:进程以退出代码 1 完成

2023-04-22移动开发问题
96

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

问题描述

我无法启动我的安卓模拟器.似乎没有加载任何内容.

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

推荐答案

这些是来自 libGLlibstdc++

您可以通过在 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/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 完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何在 COCOS2d Android 中使用 CClistview?
How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)...
2024-08-12 移动开发问题
5

cocos2d-android:如何显示分数
cocos2d-android: how to display score(cocos2d-android:如何显示分数)...
2024-08-11 移动开发问题
7

Sqlite 数据库未从资产文件夹 Android 复制
Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)...
2024-04-15 移动开发问题
8

SQLite 数据库副本在由设备而不是模拟器生成时出现损坏
SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)...
2024-04-15 移动开发问题
4

安卓文件拷贝
Android file copy(安卓文件拷贝)...
2024-04-15 移动开发问题
6

Android如何在android中检测Edittext的Copy事件
Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)...
2024-04-15 移动开发问题
5