Ubuntu 16.04 环境下,在Android AVD中创建模拟器可以创建成功,但是启动的时候会报错无法启动,错误信息:
Executing tasks: [:app:assembleDebug]
Emulator: libGL error: unable to load driver: nouveau_dri.so
Emulator: libGL error: driver pointer missing
Emulator: libGL error: failed to load driver: nouveau
Emulator: libGL error: unable to load driver: swrast_dri.so
Emulator: libGL error: failed to load driver: swrast
Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
Emulator: Major opcode of failed request: 156 (GLX)
Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Emulator: Value in failed request: 0x0
Emulator: Serial number of failed request: 64
Emulator: Current serial number in output stream: 65
Emulator: Process finished with exit code 1
参考Cannot launch emulator on Linux (Ubuntu 15.10)一文中的回复,猜测可能是显卡驱动的问题:
Use "Software" in the Emulated Performance Graphics option, in the AVD settings. Very simple solution.
于是去AVD设置里面,修改如下设置:
![](https://img.haomeiwen.com/i3832962/4d26b3fe22f75b47.png)
将图形设置由默认的Automatic
修改为Software
模式即可。
网友评论