Android模拟器无法在Ubuntu 16.10上运行 [英] Android Emulator does not work on Ubuntu 16.10

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

问题描述

我使用带有Intel 2117U处理器和6GB RAM的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天全站免登陆