Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulator: glClear:466 GL err 0x502

How to solve the Android Studio 3.0.1 Emulator?

When I start to run the project with virtual device, the error start showing (Emulator: glClear:466 GL err 0x502).

The virtual device keep on blinking whenever by clicking it.

Thanks in advance...

like image 425
Galvin Gan Avatar asked Jan 02 '18 13:01

Galvin Gan


4 Answers

I'm not sure if this counts as an answer or a work around. Yesterday after updating the emulator in Android Studio to version 27.0.2 under SDK Tools I received the exact same error on all of my AVDs. The error appeared on multiple windows laptops I have running Android Studio whenever I started any virtual device in the emulator. The only things I had done to both the laptops in the last day was update Android Studio and I ran a general Windows update.

After some testing I found that if I change the configuration on the virtual devices in the emulator under "Emulated Performance - Graphics" so they use Software GLES 1.1 the error goes away. Before that I had the default setting of Automatic. I tested starting up the virtual devices with the Emulated Performance Graphics setting on Hardware GLES 2.0 and the error came back. No hardware or display drivers were changed on either of my laptops so no idea why the error came up all of a sudden after the Emulator update.

like image 100
Mike Avatar answered Nov 01 '22 19:11

Mike


I faced the same problem after upgrading to Android studio 3.0.1. I was using emulator Nexus_6P_API_23 where screen started flickering after upgrade. To be precise, screen was toggling up-side down and reverse.

Following changes solved the problem making two changes in emulator settings:

  1. "Emulated Performance - Graphics" -> Software - GLES 2.0
  2. Memory RAM increased to 3072 MB
like image 33
neeraj bahmania Avatar answered Nov 01 '22 20:11

neeraj bahmania


I resolved it by reinstalling Android Emulator from SDK tool section. Apart from it, also reinstall HAXM with 4GB memory. Then create a new AVD with 2GB RAM and 512 MB VM space.

enter image description here

like image 2
Sreeraj TR Avatar answered Nov 01 '22 21:11

Sreeraj TR


I get this when I have started Firefox and afterwards started the emulator in Adnroid studio, seems that Firefox hogs som resource or that the resource is not sharable. It starts with that the event log spits out:

07:31 Emulator: libpng warning: iCCP: known incorrect sRGB profile

07:31 Emulator: libpng warning: iCCP: known incorrect sRGB profile

Usually ends with Emulator: glClear:470 GL err 0x506 and the emulator dies.

My workaround, dont have firefox open when I start the emulator, opening firefox after doesnt now cause this error

Running system, Win10 latest patches as this date and firefox 60.0.2 (64-bit) and android studio 3.1.4

like image 1
Kkloe Avatar answered Nov 01 '22 20:11

Kkloe