1

when I run the emulator in android studio 3 canary 6 I have this error:

Emulator: libGL error: unable to load driver: r600_dri.so
Emulator: libGL error: driver pointer missing
Emulator: libGL error: failed to load driver: r600
Emulator: libGL error: unable to load driver: swrast_dri.so
Emulator: libGL error: failed to load driver: swrast
Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)
Emulator: Major opcode of failed request:  155 (GLX)
Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)
Emulator: Value in failed request:  0x0
Emulator: Serial number of failed request:  33
Emulator: Current serial number in output stream:  34
Emulator: Process finished with exit code 1

but when I command emulator by terminal ~/Android/Sdk/tools/emulator -avd (put name device) -use-system-libs it works fine.

please anyone help me. (my systeme d'exploitation is Linux ubuntu)

I don't know how to make it run from the android studio.

enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • Possible duplicate of [Cannot launch emulator on Linux (Ubuntu 15.10)](https://stackoverflow.com/questions/35911302/cannot-launch-emulator-on-linux-ubuntu-15-10) – Matt Clark Jul 12 '17 at 00:26
  • When I Command Emulator with this line ~/Android/Sdk/tools/emulator -avd (put name device) -use-system-libs it's work fine but I can't command it from android studio – Khalid EL MRABTI Jul 17 '17 at 20:09

1 Answers1

1

You can set the environment variable ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 to enforce the same behaviour as the -use-system-libs option.

One easy way to do this is to copy the desktop file from /usr/share/applications/android-studio-canary.desktop to ~/.local/share/applications/android-studio-canary.desktop and change the "Exec" line like this:

Exec=env ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 LANG=C android-studio-canary %f

(I also set LANG=C because with my local locale setting, floating point numbers in XML files are interpreted wrong)

Fex
  • 26
  • 1