Cannot launch emulator on Linux (Ubuntu 15.10)

2019-01-03 21:24发布

I try to launch emulator but it outputs into log:

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:  47
Current serial number in output stream:  46 
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:  47   
Current serial number in output stream:  46 
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 emulator: WARNING: Increasing RAM size to 1GB

How to fix it? I read topics with similar errors but it doesn't help me.

13条回答
来,给爷笑一个
2楼-- · 2019-01-03 21:51

In my case (Ubuntu 16.10 64-bit, Android Studio 2.3) libs were located in another place. So commands are:

/home/myusername/Android/Sdk/emulator/lib64/libstdc++

➜  libstdc++ ll
total 9,3M
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18

➜  libstdc++ mv libstdc++.so.6 libstdc++.so.6.bak
➜  libstdc++ mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
➜  libstdc++ ln -s /usr/lib32/libstdc++.so.6 /home/myusername/Android/Sdk/emulator/lib64/libstdc++ 
➜  libstdc++ ln -s /usr/lib32/libstdc++.so.6.0.22 /home/myusername/Android/Sdk/emulator/lib64/libstdc++ 

➜  libstdc++ ll
total 9,3M
lrwxrwxrwx 1 myusername myusername   25 мар 29 13:18 libstdc++.so.6 -> /usr/lib32/libstdc++.so.6
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.0.18.bak
lrwxrwxrwx 1 myusername myusername   30 мар 29 13:19 libstdc++.so.6.0.22 -> /usr/lib32/libstdc++.so.6.0.22
-rwxr-xr-x 1 myusername myusername 4,6M мар 21 00:09 libstdc++.so.6.bak

And now emulator is launched from AVD manager normally.

查看更多
登录 后发表回答