Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu Android Studio Cannot Launch Avd in Emulator

Tags:

linux

android

/home/console/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_4_API_25

libGL error: unable to load driver: r600_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: r600

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:  155 (GLX)

  Minor opcode of failed request:  6 (X_GLXIsDirect)

  Serial number of failed request:  49

  Current serial number in output stream:  48

libGL error: unable to load driver: r600_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: r600

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:  155 (GLX)

  Minor opcode of failed request:  6 (X_GLXIsDirect)

  Serial number of failed request:  49

  Current serial number in output stream:  48

libGL error: unable to load driver: r600_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: r600

libGL error: unable to load driver: swrast_dri.so

libGL error: failed to load driver: swrast

X Error of failed request:  BadValue (integer parameter out of range for operation)

  Major opcode of failed request:  155 (GLX)

  Minor opcode of failed request:  24 (X_GLXCreateNewContext)

  Value in failed request:  0x0

  Serial number of failed request:  33

  Current serial number in output stream:  34

QObject::~QObject: Timers cannot be stopped from another thread

using Android Studio 2.2.2. Operating system is Ubuntu

enter image description here

like image 947
xinYW Avatar asked Mar 24 '26 15:03

xinYW


1 Answers

Android Studio comes with a libstdc++.so.6 that doesn't work properly together with Ubuntu. Forcing Android Studio to use the system's libstdc++.so.6 fixes this.

Android SDK Tools 25.2.x and earlier:

mv /opt/Android/SDK/tools/lib64/libstdc++/libstdc++.so.6 /opt/Android/SDK/tools/lib64/libstdc++/libstdc++.so.6.bak

With the release of Android SDK Tools 25.3.0 the emulator has been moved to a separate package.

Android SDK Tools 25.3.0 and later:

mv /opt/Android/SDK/emulator/lib64/libstdc++/libstdc++.so.6 /opt/Android/SDK/emulator/lib64/libstdc++/libstdc++.so.6.bak

Change the path /opt/Android/SDK in both lines to the location where you installed the Android SDK.

Note that you will (likely) have to repeat the process when you update the SDK (tools).

like image 118
Forage Avatar answered Mar 26 '26 06:03

Forage



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!