Android 模拟器不适用于 Ubuntu 16.10 [英] Android Emulator does not work on Ubuntu 16.10

查看:29
本文介绍了Android 模拟器不适用于 Ubuntu 16.10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是配备英特尔 2117U 处理器和 6GB 内存的 Acer Aspire E1-530.

I use an Acer Aspire E1-530 with an Intel 2117U Processor and 6GB of RAM.

我遵循了 React Native 网站 安装 React Native 和 Android Studio 2.3,并按照 本 Ubuntu 文档 中的说明安装 KVM一>.Android Studio 启动没有问题,我成功地设置了 AVD,但是当我启动 AVD 时,一个小窗口会出现一秒钟然后消失.我也尝试从 ~/Android/Sdk/tools 运行 emulator,但它显示了这个错误:

I followed the steps given in the React Native Website to install React Native and Android Studio 2.3, and also installed KVM as given in this Ubuntu documentation. Android Studio launches without a problem, and I was successfully able to setup an AVD, but when I launch the AVD, a small window shows up for a brief second and then disappears. I also tried running emulator from ~/Android/Sdk/tools, but it shows this error:

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 时,我得到以下输出:

When I run emulator-check accl, I get the following output:

accel:
0
KVM (version 12) is installed and usable.
accel

推荐答案

用你自己的替换模拟器的 libstdc++.so:

Replace emulator's libstdc++.so with your own:

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++/

这篇关于Android 模拟器不适用于 Ubuntu 16.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆