android-studio - Android Studio 错误 |模拟器 : emulator: ERROR: VkCommonOperations. cpp:496:无法创建 Vulkan 实例

标签 android-studio

正如标题所示,我的 Linux Mint 19.3 上的 Android Studio 存在问题。我尝试通过官方下载页面、软件管理器安装 Android Studio,现在通过 snap 安装最新版本。创建 vulkan 实例失败是我尝试在 android studio 3.6.1 中启动应用程序时出现的第一个错误。模拟器屏幕是黑色的,没有任何 react 。

我跑 Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionicDell XPS 13 9343Kernel: 5.3.0-40-generic x86_64 .我已经安装了所有驱动程序。

这是我尝试启动应用程序时的事件日志:

17.3.2020
10:32   Executing tasks: [:app:assembleDebug] in project /home/samuel/Downloads/Exemple2

10:32   Emulator: emulator: ERROR: VkCommonOperations.cpp:496: Failed to create Vulkan instance.

10:32   Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: /home/samuel/.android/emulator-grpc.cer security will be disabled.

10:32   Emulator: E0317 10:32:43.165019034   12845 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1584433963.164985521","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}

10:32   Emulator: Started GRPC server at 127.0.0.1:8554

10:32   Gradle build finished in 1 s 288 ms

最佳答案

在了解到这是一个 GPU 问题后,我找到了一种启动模拟器的方法......

sudo ubuntu-drivers autoinstall
升级了我的 Nvidia GPU 驱动程序并将问题改为另一个:

Blockquote Error while Running Android Application - Could not initialize OpenglES emulation, use '-gpu off' to disable it


所以根据this issuethis answer
我将模拟设备更改为允许我更改图形的“Software-GLE 2.0”,而不是选择“Automatic”或“Hardware-GLE 2.0”(在软件中模拟图形)(并非所有人都允许更改它)
我使用了 Galaxy Nexus API 30 - R 并且模拟工作正常,即使我仍然有这个 SO_REUSEPORT 错误!
希望它可以帮助某人...

关于android-studio - Android Studio 错误 |模拟器 : emulator: ERROR: VkCommonOperations. cpp:496:无法创建 Vulkan 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60718817/

相关文章:

java - Android从文件路径获取图像到位图

java - android studio build 突然抛出很多错误

android-studio - 使用 Gradle 在 Android Studio 中出现 UnsatisfiedLinkError

java - 登录 Facebook 后发送回 MainActivity

android - Gradle + Annotations + Flavors = 不会运行注释处理器

android-studio - 取消选中使用Androidx工件

android - 按下后退按钮时如何删除 Stack 中的所有 Activity

android-studio - 安装studio2.3后无法解析第三方库

android - Gradle 丢失了我的 R.java 文件

android - Android Studio 的 build gradle (app) 中定义的依赖版本在哪里?