android – how to fix " Emulator: Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled ((null):0, (null))"-ThrowExceptions

Exception or error:

I’am working on xfce “Xubuntu”, I have updated my android studio, and every time I execute any project with emulator I get this two errors:

Emulator: Warning: QXcbIntegration: Cannot create platform OpenGL
context, neither GLX nor EGL are enabled ((null):0, (null))

Emulator: emulator: ERROR: VkCommonOperations.cpp:496: Failed to
create Vulkan instance.

How to solve:

I got the first error.

Emulator: Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX >nor EGL are enabled ((null):0, (null))

The error remained but the emulator is running properly. I changed the following two settings with the next two values in the config.ini file from the avd folder.

hw.gpu.enabled = no

hw.gpu.mode = swiftshader_indirect

The avd folder should be located similarly:
/home/[your_linux_username]/.android/avd/Nexus_One_API_22.avd/

Nexus_One_API_22 is the name of the avd.

Leave a Reply

Your email address will not be published. Required fields are marked *