glTexImage2D: got err pre :( 0x506 internal 0x1908

2020-05-21 08:56发布

When running my emulator with Android Studio I can't see anything on the emulator screen (everything is black). I get the following Event Log:

Emulator:glTexImage2D: got err pre :( 0x506 internal 0x1908 format 0x1908 type 0x1401

I already tried to clean the project and rebuild it but nothing happened. I think it's something related just with the emulator.

Does anyone know what's going on?

7条回答
2楼-- · 2020-05-21 09:41

I was facing same problem. Even I don't have option of Boot Option in Virtual device configuration.

My AVD was Nexus 5X with Android v26. Then I tried to upgrade version to 28(latest) but same error. Then I deleted that AVD and created new AVD with Nexus 5 skin and Android v28 and it worked.

查看更多
贼婆χ
3楼-- · 2020-05-21 09:45

As @SirQuickWay's solution didn't work for me I had to change OpenGL ES Renderer and OpenGL ES API level in the emulator settings to SwiftShader and Renderer Maximum respectively. You can find these settings here:

Emulator bar > ... > Settings > Advanced (tab) like this: Android Emulator OpenGL settings

EDIT: Restart of the emulator is required after applying the settings.

查看更多
淡お忘
4楼-- · 2020-05-21 09:47

My solution was to change the Emulator bar > Settings > Advanced > OpenGL ES Render change it to SwiftShader then in the same Window change OpenGL API Level to Renderer Maximum then duplicate the emulator and launch it again.

查看更多
在下西门庆
5楼-- · 2020-05-21 09:47

Coming to this same problem from a Visual Studio / Xamarin perspective:

  1. Click on the Open Android Device Manager button in Visual Studio.
  2. Select the emulator causing the problem and ensure that it is stopped.
  3. Click the Edit button at the top to change the options.
  4. Change the hw.gpu_mode to swiftshader (one of the options in the dropdown)

On my machine this was set to guest with a warning triangle next to it:

Dialog box showing the warning triangle

查看更多
不美不萌又怎样
6楼-- · 2020-05-21 09:52

My emulator was working well and then it crashed with a black screen. After that it always started with a black screen. So I went to Tools > AVD Manager > Virtual device configuration and clicked on down arrow of the last working device, made a "duplicate" of the device and deleted the original device. The new "duplicate" emulator worked.

查看更多
我命由我不由天
7楼-- · 2020-05-21 09:53

In my case, it turned out that the error was as a result of me trying an emulator that runs on API 28 while the compileSdkVersion of the app is 27. Changing the API of the emulator solved it.

  1. Launch the AVD Manager
  2. Click on the Edit icon (pencil) of your device. This is in the Actions column
  3. Click Change on the API and select one that matches your compileSdkVersion. It will download if you don't have it already.
  4. Restart your emulator, and enjoy!
查看更多
登录 后发表回答