下载并安装 Android Studio 3.2 后,我执行了./studio.sh
。什么也没做,我hello world
第一次在 Andriod Emulator Nexus 5X API 27 上测试应用程序,但是 AVD Emulator 无法启动,并且在事件日志中显示如下消息:
10/14/18
12:33 PM * daemon not running; starting now at tcp:5037
12:33 PM * daemon started successfully
12:34 PM Gradle sync started
12:34 PM Project setup started
12:34 PM Gradle sync finished in 3 s 396 ms (from cached state)
12:34 PM Executing tasks: [:app:assembleDebug]
12:34 PM Emulator: libGL error: unable to load driver: i965_dri.so
12:34 PM Emulator: libGL error: driver pointer missing
12:34 PM Emulator: libGL error: failed to load driver: i965
12:34 PM Emulator: libGL error: unable to load driver: swrast_dri.so
12:34 PM Emulator: libGL error: failed to load driver: swrast
12:34 PM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
12:34 PM Emulator: Major opcode of failed request: 152 (GLX)
12:34 PM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
12:34 PM Emulator: Value in failed request: 0x0
12:34 PM Emulator: Serial number of failed request: 56
12:34 PM Emulator: Current serial number in output stream: 57
12:34 PM Emulator: Process finished with exit code 1
12:35 PM Gradle build finished in 47 s 302 ms
12:39 PM Executing tasks: [:app:assembleDebug]
12:39 PM Gradle build finished in 4 s 336 ms
12:39 PM Emulator: libGL error: unable to load driver: i965_dri.so
12:39 PM Emulator: libGL error: driver pointer missing
12:39 PM Emulator: libGL error: failed to load driver: i965
12:39 PM Emulator: libGL error: unable to load driver: swrast_dri.so
12:39 PM Emulator: libGL error: failed to load driver: swrast
12:39 PM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
12:39 PM Emulator: Major opcode of failed request: 152 (GLX)
12:39 PM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
12:39 PM Emulator: Value in failed request: 0x0
12:39 PM Emulator: Serial number of failed request: 56
12:39 PM Emulator: Current serial number in output stream: 57
12:39 PM Emulator: Process finished with exit code 1
我不知道出了什么问题,教程中没有提到这种错误,只是直截了当。
请帮我解决这个问题。谢谢。
答案1
我遇到了类似的问题,通过更新具有可用更新的 SDK 工具解决了该问题。你可以这样做:
- 工具->SDK 管理器
- 在下面SDK 平台,选择有可用更新的软件包并选择好的
- 在下面SDK 工具,确认 Android 模拟器、Android SDK 平台工具和 Android SDK 工具已更新为最新版本。如果没有,请选择相应的开发者工具并选择好的以便他们获取更新。