Android Emulator not Launching on Ubuntu 17.04

425 Views Asked by At

I am using Android Studio 3.0.1 on Ubuntu 17.04.When I am trying to run app on virtual device following error messages popups. Emulator: libGL error: unable to load driver: i965_dri.so

Emulator: libGL error: driver pointer missing

Emulator: libGL error: failed to load driver: i965

Emulator: libGL error: unable to load driver: i965_dri.so

Emulator: libGL error: driver pointer missing

Emulator: libGL error: failed to load driver: i965

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:  39

Emulator: Current serial number in output stream:  40

Emulator: Process finished with exit code 1

Please give me some help to overcome these errors.

1

There are 1 best solutions below

0
On

Ok looks like in the recent android studio update, Google used a libstdc++ incompatible with the Intel driver installed on the system.

[dustin@dustin-linux:tools]$ LIBGL_DEBUG=verbose ./emulator
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/i965_dri.so
libGL: dlopen /usr/lib/xorg/modules/dri/i965_dri.so failed (/home/dustin/opt/android-studio/sdk/tools/lib64/libstdc++/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/xorg/modules/dri/i965_dri.so))
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
libGL: dlopen /usr/lib/xorg/modules/dri/swrast_dri.so failed (/home/dustin/opt/android-studio/sdk/tools/lib64/libstdc++/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/xorg/modules/dri/swrast_dri.so))
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  49
  Current serial number in output stream:  48
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.

If you are an Android SDK user, please use '@<name>' or '-avd <name>'
to start a given virtual device (use -list-avds to print available ones).

Otherwise, follow the instructions in -help-disk-images to start the emulator

so basically I renamed the "android-studio/sdk/tools/lib64/libstdc++/libstdc++.so.6" file so it has to use the system ones ... that basically does the trick – for me.

originally posted here