This is my first time attempting anything Android. I have installed Android Studio 2021.3.1 Patch 1 on Ubuntu 22.04 and created an Empty Compose Activity as a test.
The Device Manager looks like this
But when I try to run it I get
The emulator process for AVD Pixel_XL_API_33 has terminated
INFO - Emulator: Pixel XL API 33 - [...]android-sdk/emulator/emulator -netdelay none -netspeed full -avd Pixel_XL_API_33 -qt-hide-window -grpc-use-token -idle-grpc-timeout 300 INFO - Emulator: Pixel XL API 33 - Android emulator version 18.104.22.168 (build_id 9189900) (CL:N/A) INFO - Emulator: Pixel XL API 33 - emulator: INFO: Found systemPath [...]/android-sdk/system-images/android-33/google_apis/x86_64/ WARN - Emulator: Pixel XL API 33 - Failed to process .ini file ~/.android/avd/Pixel_XL_API_33.avd/quickbootChoice.ini for reading. WARN - Emulator: Pixel XL API 33 - cannot add library [...]/android-sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed INFO - Emulator: Pixel XL API 33 - WARNING: lavapipe is not a conformant vulkan implementation, testing use only. INFO - Emulator: Pixel XL API 33 - Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) ERROR - Emulator: Pixel XL API 33 - Emulator terminated with exit code 139
This happens with Android 5.0 and 8.1 projects.
As per this question I have tried
sudo ubuntu-drivers autoinstall which gives
"/usr/bin/ubuntu-drivers", line 187, in command_install UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install) File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in nvidia_desktop_pre_installation_hook with_nvidia_kms = version >= 470 UnboundLocalError: local variable 'version' referenced before assignment
mesa-vulkan-drivers are already installed.
How do I fix this error and run a basic project out-of-the-box in an emulator on Linux?