我在ubuntu 16.04中使用
android studio 2.0并且让我运行模拟器avd因为显然它缺少驱动程序.我怎么能解决这个问题?
这是我运行模拟器后抛出的异常
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
非常感谢任何回复!
解决方法
好吧,我找到了解决这个问题的方法.
我不知道Android Studio有什么问题,但他不能执行任何模拟器,现在我的解决方案是通过命令执行模拟器,然后使用android studio安装模拟器执行下面的命令,因为你需要有我的情况下的模拟器Nexus_5_API_21.
我不知道Android Studio有什么问题,但他不能执行任何模拟器,现在我的解决方案是通过命令执行模拟器,然后使用android studio安装模拟器执行下面的命令,因为你需要有我的情况下的模拟器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
我不记得我找到这个解决方案的确切位置,但我认为它在谷歌论坛上