我使用带有Intel 2117U处理器和6GB RAM的Acer Aspire E1-530。
我按照React Native Website中给出的步骤安装了React Native和Android Studio 2.3,并按照this Ubuntu documentation中的说明安装了KVM。 Android Studio启动没有问题,我成功地设置了AVD,但是当我启动AVD时,一个小窗口显示一小段时间然后消失。我还尝试从emulator
运行~/Android/Sdk/tools
,但它显示了此错误:
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
答案 0 :(得分:11)
替换模拟器的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 :(得分:2)
从终端运行模拟器
$ emulator -use-system-libs -avd YOUR_VIRTUAL_DEVICE_NAME