Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Vulkan 1.0 APIs missing from instance) when launching Android Emulator(Q API 29) via Android Studio 3.5 and 3.6 Canary 9

I created three AVDs base on Android Q (API 29), using these system images:
Android 10(Google Play), Android 10(Google APIs), Android 10.

All of these emulators failed to launch. With the following error:

18:38   Emulator: VK_VERSION_1_0 check failed: vkCreateInstance not found

18:38   Emulator: VK_VERSION_1_0 check failed: vkEnumerateInstanceExtensionProperties not found

18:38   Emulator: VK_VERSION_1_0 check failed: vkEnumerateInstanceLayerProperties not found

18:38   Emulator: createOrGetGlobalVkEmulation: Warning: Vulkan 1.0 APIs missing from instance

18:38   Emulator: Process finished with exit code 0

I have referred to this link:
Emulator: Unexpected feature list: MultiDisplay VulkanNullOptionalStrings YUV420888toNV21 YUVCache
But this issue is different from my issue.

I tried in Android Studio 3.5, and Android Studio 3.6 Canary 9, the latest version in stable and preview channel. Both end with the same result.

https://source.android.google.cn/devices/graphics/implement-vulkan
According to this page, Vulkan 1.0 should already exists since Android 7.0, I have no idea why Vulkan 1.0 is missing on Android 10.

Or should I just wait for the newer version of system image after Google officially release Android 10?

like image 617
Jake Wei Avatar asked Sep 03 '19 11:09

Jake Wei


3 Answers

Credit to Anthony who posted this answer. Thought it would be helpful here, as it immediately solved the problem for me without any impact to performance.

You need to disable the Vulkan apps to talk to the emulator.

To do so, just create the file ~/.android/advancedFeatures.ini (it doesn't exist already) and add the following lines:

Vulkan = off
GLDirectMem = on

(For Windows users the path should be C:\Users%USER%.android\advancedFeatures.ini)

like image 184
ConcernedHobbit Avatar answered Sep 22 '22 15:09

ConcernedHobbit


I had the same issue on my system - Ubuntu 19.10 and Android Studio 3.5.3. Except I had a "Vulkan 1.1 APIs missing from instance" error and my emulator was running slow.

The issue is not with the emulator, it's with your host system. Your host system doesn't have support for the Vulkan APIs that the new Android 10 emulator uses.

To fix this, I had to install a newer version of the mesa packages from a third-party PPA.

The steps to do so:

  1. run sudo add-apt-repository ppa:kisak/kisak-mesa to add the PPA to your system.

  2. run sudo apt update and then sudo apt upgrade. This should download and install the newer mesa packages from the PPA.

I rebooted my system just to be safe, and the emulator runs fine and smooth now.

like image 9
Guest1997 Avatar answered Oct 16 '22 07:10

Guest1997


I'm not sure why that's happening (it was happening to me to using API 29). I cloned the device in the AVD Manager and dropped the API down to 28 (Pie, Android 9) and I was able to successfully launch my app again.

like image 3
Josh M. Avatar answered Oct 16 '22 07:10

Josh M.