简体   繁体   English

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

[英]Ubuntu Android Studio Cannot Launch Avd in Emulator

/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. 使用Android Studio 2.2.2。 Operating system is Ubuntu 操作系统是Ubuntu

在此输入图像描述

Android Studio comes with a libstdc++.so.6 that doesn't work properly together with Ubuntu. Android Studio附带了一个libstdc ++。so.6,它与Ubuntu无法正常工作。 Forcing Android Studio to use the system's libstdc++.so.6 fixes this. 强制Android Studio使用系统的libstdc ++。so.6修复此问题。

Android SDK Tools 25.2.x and earlier: Android SDK工具25.2.x及更早版本:

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的发布,模拟器已被移动到单独的包中。

Android SDK Tools 25.3.0 and later: 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

Change the path /opt/Android/SDK in both lines to the location where you installed the Android SDK. 将两行中的路径/opt/Android/SDK更改为安装Android SDK的位置。

Note that you will (likely) have to repeat the process when you update the SDK (tools). 请注意,您(可能)在更新SDK(工具)时必须重复此过程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM