Android Emulator在Ubuntu 16.10上无法正常工作
问题描述:
我使用的是带有Intel 2117U处理器和6GB内存的Acer Aspire E1-530。Android Emulator在Ubuntu 16.10上无法正常工作
我按照React Native Website中的步骤安装了React Native和Android Studio 2.3,并且还安装了this Ubuntu documentation中给出的KVM。 Android Studio启动时没有问题,我成功地设置了AVD,但是当我启动AVD时,一个小窗口出现一瞬间,然后消失。我也试着从~/Android/Sdk/tools
运行emulator
,但它显示了这个错误:
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
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: 55
Current serial number in output stream: 54
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
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: 55
Current serial number in output stream: 54
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
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: 39
Current serial number in output stream: 40
QObject::~QObject: Timers cannot be stopped from another thread
Segmentation fault (core dumped)
当我运行emulator-check accl
,我得到以下的输出:
accel:
0
KVM (version 12) is installed and usable.
accel
答
更换模拟器的libstdC++这样用自己:
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/libstdc++.so ~/Android/Sdk/emulator/lib64/libstdc++/
+1
对此答案的任何澄清? –
你有独立显卡吗? –