Ubuntu Android Studio无法在模拟器中启动Avd

时间:2016-10-20 09:06:16

标签: android linux

/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

使用Android Studio 2.2.2。操作系统是Ubuntu

enter image description here

1 个答案:

答案 0 :(得分:10)

Android Studio附带了一个与Ubuntu无法正常工作的libstdc ++。so.6。强制Android Studio使用系统的libstdc ++。so.6修复此问题。

Android SDK Tools 25.2.x及更早版本:

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

随着Android SDK Tools 25.3.0的发布,模拟器已移至单独的包中。

Android SDK工具25.3.0及更高版本:

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

将两行中的路径/opt/Android/SDK更改为您安装Android SDK的位置。

请注意,您(可能)在更新SDK(工具)时必须重复此过程。