当前位置:   article > 正文

(十七)ubuntu 16.04 解决Android studio 创建模拟器失败问题_ubuntu 无法创建as模拟器

ubuntu 无法创建as模拟器

参考链接:

1.点击打开链接(但由于是老回答了,修改方法有变更)

2.点击打开链接


1.报错如下(查看event log):

  1. 下午8:51 Emulator: libGL error: unable to load driver: nouveau_dri.so
  2. 下午8:51 Emulator: libGL error: driver pointer missing
  3. 下午8:51 Emulator: libGL error: failed to load driver: nouveau
  4. 下午8:51 Emulator: libGL error: unable to load driver: swrast_dri.so
  5. 下午8:51 Emulator: libGL error: failed to load driver: swrast
  6. 下午8:51 Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
  7. 下午8:51 Emulator: Major opcode of failed request: 155 (GLX)
  8. 下午8:51 Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
  9. 下午8:51 Emulator: Value in failed request: 0x0
  10. 下午8:51 Emulator: Serial number of failed request: 58
  11. 下午8:51 Emulator: Current serial number in output stream: 59
  12. 下午8:51 Emulator: emulator: ERROR: Missing initial data partition file: /home/jiatai/.android/avd/Pixel_2_XL_API_27.avd/userdata.img
  13. 下午8:51 Emulator: Process finished with exit code 1



2. Android studio版本及Ubuntu版本

android studio版本:


Ubuntu版本:

  1. jiatai@jiatai:~/Android/Sdk/emulator/lib64/libstdc++$ uname -a
  2. Linux jiatai 4.13.0-37-generic #42~16.04.1-Ubuntu SMP Wed Mar 7 16:03:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


3.解决办法:

用电脑自带的libstdc++.so.6代替sdk自带的

  1. jiatai@jiatai:~/Android/Sdk/emulator/lib64/libstdc++$ sudo apt-get install lib64stdc++6
  2. jiatai@jiatai:~/Android/Sdk$ find -iname libstdc++.*.*
  3. ./emulator/lib/libstdc++/libstdc++.so.6.0.19
  4. ./emulator/lib/libstdc++/libstdc++.so.6
  5. ./emulator/lib64/libstdc++/libstdc++.so.6.0.19
  6. ./emulator/lib64/libstdc++/libstdc++.so.6
  7. jiatai@jiatai:~/Android/Sdk$ cd ./emulator/lib64/libstdc++/
  8. jiatai@jiatai:~/Android/Sdk/emulator/lib64/libstdc++$ mv libstdc++.so.6 libstdc++.so.6.bak
  9. jiatai@jiatai:~/Android/Sdk/emulator/lib64/libstdc++$ ls
  10. libstdc++.so.6.0.19 libstdc++.so.6.bak
  11. jiatai@jiatai:~/Android/Sdk/emulator/lib64/libstdc++$ ln -s /usr/lib64/libstdc++.so.6


4.打开模拟器后闪退

log:

Process finished with exit code 139

The following steps did the trick for me.

  1. Go into your virtual device's settings.
  2. Chang "Emulated Performance" from "Automatic" to "Software".

5.效果

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号