我使用的是Ubuntu 17.4,当我尝试安装android studio并运行我的虚拟设备时,它给出了这些错误

问题描述:

任何人都可以帮忙吗?我不能在Ubuntu上运行这个android虚拟设备吗?我使用的是Ubuntu 17.4,当我尝试安装android studio并运行我的虚拟设备时,它给出了这些错误

2:24 PM Executing tasks: [:app:assembleDebug] 

2:24 PM Emulator: libGL error: unable to load driver: i965_dri.so 

2:24 PM Emulator: libGL error: driver pointer missing 

2:24 PM Emulator: libGL error: failed to load driver: i965 

2:24 PM Emulator: libGL error: unable to load driver: i965_dri.so 

2:24 PM Emulator: libGL error: driver pointer missing 

2:24 PM Emulator: libGL error: failed to load driver: i965 

2:24 PM Emulator: libGL error: unable to load driver: swrast_dri.so 

2:24 PM Emulator: libGL error: failed to load driver: swrast 

2:24 PM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation) 

2:24 PM Emulator: Major opcode of failed request: 155 (GLX) 

2:24 PM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext) 

2:24 PM Emulator: Value in failed request: 0x0 

2:24 PM Emulator: Serial number of failed request: 39 

2:24 PM Emulator: Current serial number in output stream: 40 

2:24 PM Emulator: Process finished with exit code 1 

2:24 PM Gradle build finished in 5s 92ms 
+0

看起来像这样的问题:https://*.com/questions/35911302/cannot-launch-emulator-on-linux-ubuntu-15-10和这个:https://*.com/questions/42872128/Android的模拟器 - 不 - 不工作在Ubuntu的-16-10。尝试解决这些问题。 –

这些都是你需要遵循解决模拟器问题的具体步骤:

1)更改目录:

$ cd ~/Android/Sdk/emulator/lib64/libstdc++ 

2)创建符号链接库:

$ mv libstdc++.so.6 libstdc++.so.6.bak 

3)在同一目录下:

$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 

这应该解决它!

+0

这应该被标记为正确的答案,我看到的大多数答案都指向〜/ Android/Sdk/tools/lib64/libstdC++,而不是〜/ Android/Sdk/emulator/lib64/libstdC++,它并不存在于我的案例:Android Studio 3.0.1感谢您分享! – wax911