When I start the emulator in Android Studio : (Used Ubuntu 18.04.3 LTS)

Emulator: Warning: QStandardPaths: wrong ownership on runtime directory /run/user/1000/snap.android-studio, 0 instead of 1000 ((null):0, (null))

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

Solution 1: Martin Zeitler

There are two problems:

a) likely that snap install is crap, better install the standalone version of Android Studio

or run sudo chown -R 1000:1000 /run/user/1000/snap.android-studio to fix the permissions.

b) you need to install GL drivers, assuming you have a suitable graphics card available.

One can check these GL drivers with glxinfo -B.