Linux 系统下启动Android模拟器报错闪退

Linux 系统下启动Android模拟器报错

Emulator: libGL error: unable to load driver: radeonsi_dri.so
Emulator: libGL error: driver pointer missing
Emulator: libGL error: failed to load driver: radeonsi
Emulator: libGL error: unable to load driver: radeonsi_dri.so
Emulator: libGL error: driver pointer missing
Emulator: libGL error: failed to load driver: radeonsi
Emulator: libGL error: unable to load driver: swrast_dri.so
Emulator: libGL error: failed to load driver: swrast
Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)
Emulator: Major opcode of failed request:  156 (GLX)
Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)
Emulator: Value in failed request:  0x0
Emulator: Serial number of failed request:  64
Emulator: Current serial number in output stream:  65
Emulator: Process finished with exit code 1

解决方法

  • 在模拟器设置中将Graphics 设置为Software模式
  • 或者命令行启动
~/Android/Sdk/tools/emulator -avd 模拟器名称 -use-system-libs
  • 或者创建软链接
    可以先查找系统的文件在哪个位置
find / -name "libstdc++.so*"

我的查找到的路径在 /usr/lib/x86_64-linux-gnu/
然后创建软链接

ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6*  $ANDROID_SDK_HOME/Sdk/emulator/lib64/libstdc++/

你可能感兴趣的:(Linux 系统下启动Android模拟器报错闪退)