无法在模拟器Android Studio中启动AVD

sus*_*dlh 17 android android-emulator android-studio

android studio 2中的模拟器问题...

无法在模拟器中启动AVD

Output:
libGL error: failed to load driver: nouveau
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: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
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: nouveau_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: nouveau
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)
emulator: WARNING: VM heap size set below hardware specified minimum of 384MB
  Major opcode of failed request:  155 (GLX)
emulator: WARNING: Setting VM heap size to 384MB
  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
Run Code Online (Sandbox Code Playgroud)

这是在控制台中:

错误

当运行该答案的命令时,它给了我 bash: cd: /android-sdk-linux_x86/tools/lib64/libstdc++: No such file or directory

请大家帮忙....

And*_*rey 31

在仿真性能图形选项中选择"软件",在AVD设置中而不是"自动"

截图


sus*_*dlh 25

Sdk路径问题.....

链接Sdk路径而不是$ ANDROID_HOME

  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++ 
Run Code Online (Sandbox Code Playgroud)

在我的情况下使用的路径一样,

 1. cd Desktop/blackgoogle/Android/Sdk/tools/lib64/libstdc++
 2. mv libstdc++.so.6 libstdc++.so.6.bak
 3. cd
 4. ln -s /usr/lib64/libstdc++.so.6 Desktop/blackgoogle/Android/Sdk/tools/lib64/libstdc++
Run Code Online (Sandbox Code Playgroud)

注:-pathOfSDK /工具/ lib64目录/的libstdc ++

可能在Android工作室中无法启动模拟器的复制品


小智 5

使用以下3个命令来解决此错误.

mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6{,.bak}
mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6.0.18{,.bak}
ln -s /usr/lib/libstdc++.so  ~/Android/Sdk/tools/lib64/libstdc++/
Run Code Online (Sandbox Code Playgroud)

  • 在ubuntu 17.10上,路径再次改变:`mv~/Android/Sdk/emulator/lib64/libstdc ++/libstdc ++.so.6 {,.bak}``mv~/Android/Sdk/emulator/lib64/libstdc ++/libstdc ++.so .6.0.18 {,.bak}``ln -s /usr/lib/gcc/x86_64-linux-gnu/7/libstdc++.so~Android/Sdk/emulator/lib64/libstdc ++ /` (3认同)
  • 在Ubuntu 17.04上,路径有点不同:`mv~/Android/Sdk/emulator/lib64/libstdc ++/libstdc ++.so.6 {,.bak}`和`mv~/Android/Sdk/emulator/lib64/libstdc ++/libstdc ++.so.6.0.18 {,.bak}`以及`ln -s /usr/lib/gcc/x86_64-linux-gnu/6/libstdc++.so~Android/Sdk/emulator/lib64/libstdc ++/` (2认同)