Do not allow to run the emulator on Android studio due to the lack of a driver in the Ubuntu 16.04 operating system

I use android studio 2.0 in ubuntu 16.04 and do not let me run the avd emulator, because apparently it lacks a driver. How could I solve this problem?

this is an exception that throws after starting the emulator

Cannot launch AVD in emulator. Output: libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi 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: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi 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: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi 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: VM heap size set below hardware specified minimum of 128MB emulator: WARNING: Setting VM heap size to 384MB 

Would thank for any answer!

+7
android-emulator android-studio android-avd
source share
3 answers

Well, I found a solution to this problem. I don’t know what is wrong with Android Studio, but it cannot execute any emulator, and the solution for me is currently executed by the emulator on command, after which you install the emulator using Android studio, execute the command below because you need to have an emulator, in my case Nexus_5_API_21.

 LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_21 

I don’t remember exactly where I found this solution, but I think it is on google forums

+4
source share

I also use Android Studio 2.1 with Ubuntu 16.04

There is an answer from fooobar.com/questions/71843 / ... of a question that worked perfectly.

A few notes: My $ ANDROID_HOME is different from this. I had to take out android-sdk-linux_x86 in the file name. There were also several versions of libstdc ++. So.6 libstdc ++. So.6.0.18 and libstdC ++. So.6.0.21. I still used libstdc ++. So.6 and it worked great

 $ cd $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++ $ mv libstdc++.so.6 libstdc++.so.6.bak $ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/android-sdk-linux_x86/tools/lib64/libstdc++ 
+4
source share

What I did to solve this problem on my Xubuntu 16.04:

  • See what my video card is connected with: lspci | grep VGA lspci | grep VGA
    • Answer: some NVidia models
  • See which graphics driver I am currently using: sudo lshw -C video | grep driver sudo lshw -C video | grep driver
    • Answer: Nouveau riche default, a free software driver.
  • Installed native NVidia driver: go to the main search menu (depending on your Unity, Gnome or Xfce)> Additional drivers> switch from "nuvo" to "NVIDIA binary driver - version 3XX (proprietary, tested) enter image description here
  • Reboot

And my Android emulator errors are gone :)

+1
source share

All Articles