gpt4 book ai didi

android - AVD 模拟器无法在 Android Studio 中运行(无法初始化 OpenglES 模拟器)

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:52:54 27 4
gpt4 key购买 nike

我是开发 Android 应用程序的初学者。我刚刚在笔记本电脑上安装了 Android Studio,当我尝试打开 AVD 时,出现以下错误:

模拟器:错误:无法初始化 OpenglES 模拟,使用“-gpu off”将其禁用。

这是错误的完整日志:

Creating filesystem with parameters:

could not get wglGetExtensionsStringARB

Size: 69206016
Block size: 4096

could not get wglGetExtensionsStringARB

Blocks per group: 32768 could not get wglGetExtensionsStringARB

Inodes per group: 4224 could not get wglGetExtensionsStringARB
Inode size: 256 could not get wglGetExtensionsStringARB

could not get wglGetExtensionsStringARB

Journal blocks: 1024
Label: could not get wglGetExtensionsStringARB

Blocks: 16896 could not get wglGetExtensionsStringARB

Block groups: 1 getGLES1ExtensionString: Could not find GLES 1.x config!

Reserved block group size: 7 Failed to obtain GLES 1.x extensions string!

Created filesystem with 11/4224 inodes and 1302/16896 blocks

Could not initialize emulated framebuffer

emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

我曾尝试降低分辨率、RAM 并更换设备,但似乎没有任何效果。请指教。

更新:当我取消选中主机 GPU 选项时,AVD 正在启动,但它运行得非常慢。

最佳答案

首先解释一下问题:

Could not initialize OpenglES emulation, use '-gpu off' to disable it.

这意味着 Android 模拟器尝试使用 OpenglES,但它不起作用。渲染 2D 和 3D 计算机图形需要 OpenglES。

有两种方法可以解决这个问题:

1) 安装 OpenGL 实现

例如在 Ubuntu 16.04 上,我安装了 Mesa

sudo apt-get install mesa-utils

然后重新启动 PC,一切正常!

2) 使用软件GLES2.0

在您的虚拟设备中,将仿真性能 - 图形设置为“软件 GLES 2.0”: configure the Android Virtual Device to use Software GLES2.0

推荐第一种方法,因为它有更好的性能。

关于android - AVD 模拟器无法在 Android Studio 中运行(无法初始化 OpenglES 模拟器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30706006/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com