Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot launch emulator on Linux (Ubuntu 15.10)

I try to launch emulator but it outputs into log:

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:  47 Current serial number in output stream:  46  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:  47    Current serial number in output stream:  46  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 emulator: WARNING: Increasing RAM size to 1GB 

How to fix it? I read topics with similar errors but it doesn't help me.

like image 867
Шах Avatar asked Mar 10 '16 08:03

Шах


1 Answers

Using the libstdc++.so.6 that is available in your system instead of the one bundled with the android sdk solves this issue.

  • The emulator has a switch -use-system-libs to do this.

    ~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs

  • Alternatively you can set the ANDROID_EMULATOR_USE_SYSTEM_LIBS environment variable to 1 for your user/system. This has the benefit of making sure that the emulator will work even if you launched it from within Android Studio.

More details: https://code.google.com/p/android/issues/detail?id=197254#c15

like image 107
exception_noted Avatar answered Sep 20 '22 18:09

exception_noted