2

I'm trying to make Android Studio and the associated emulator via AVD to work under Archlinux.

I've just installed android-studio, android-sdk, and all the dependencies that Android Studio requires. When I try to start the freshly created emulator (with no particular settings), here's the error messages I receive:

17:25   * daemon not running; starting now at tcp:5037

17:25   Emulator: Couldn't statvfs() path: No such file or directory

17:25   * daemon started successfully

17:25   Emulator: Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))

17:25   Emulator: Warning: libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null))

17:25   Emulator: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]

17:25   Emulator: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]

17:25   Emulator: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]

17:25   Emulator: qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]

17:25   Emulator: Warning: QObject::moveToThread: Current thread (0x593c240) is not the object's thread (0x5a7d800).

17:25   Emulator: Cannot move to target thread (0x593c240)

17:25   Emulator: ((null):0, (null))

17:30   Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 main loop'. No response for 15000 ms

17:30   Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 CPU0 thread'. No response for 15000 ms

17:30   Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 CPU1 thread'. No response for 15000 ms

17:30   Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 CPU2 thread'. No response for 15000 ms

17:30   Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 CPU3 thread'. No response for 15000 ms

17:30   Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 main loop'. No response for 15000 ms

17:30   Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

I've reinstalled everything twice. I've also checked this topic without success. I don't understand most of these messages, so I'm a bit lost. I tried to start the emulator from the command line with the command /opt/android-sdk/emulator/emulator -avd Android_Wear_Round_API_P, it gives me the same result.

I'd be very glad to get some ideas on what the problem could be.

EDIT

Here are the elements installed, in case it's relevant: enter image description here

enter image description here

EDIT2

The type of emulator I'm trying to run is for WearOS. As a test, I tried to create an Android Nexus one. When graphics are set to 'Software', it works. Unfortunately, I can't change this option for the WearOS device. Therefore, it keeps crashing. Sometimes, it even completely crashes my system. My screen freezed, I have to manually reset my computer.

cyphics
  • 412
  • 4
  • 17
  • Open the update manager and check if you have installed "Android Emulator" under the voice "SDK Tools" – Lorenzo Vincenzi Nov 14 '18 at 16:55
  • I've also faced this issue when Android Studio updated recently. Digging dipper into how the emulator is being run, I've figured out that the emulator itself lives in _$HOME/Android/Sdk/emulator_ while the images are stored in _$HOME/.android/avd_. May be `t statvfs() path: No such file or directory` has something to do with it? I don't remember what was the directory layout of older emulator versions. – Alexander Solovets Dec 03 '18 at 15:00
  • Playing with strace I figured out that the message is about missing _ram.img_ under _.android/avd/.avd/snapshots/default_foot_. – Alexander Solovets Dec 03 '18 at 15:23
  • Try to run the emulator with software graphics. This helped me. – Alexander Solovets Dec 03 '18 at 23:38
  • I ran into a similar problem as yours but I think you're describing a much more serious issue. I'm running Manjaro linux and I just accepted the provided emulator upgrade to version 28.0.20. After upgrade emulator kept crashing with segmentation fault. Switching to software GL allowed me to get the emulator up. Once in there's some configuration in settings that allows you to flip back to hardware open GL I may have fiddled a few other things like cold boot and a reboot of computer but it's all working again magically. This problem feels like a settings migration issue w/ emulator code upgrade – user3259330 Dec 13 '18 at 04:57
  • https://stackoverflow.com/a/49125288/5771509 – Turtuvshin Sep 04 '19 at 08:27

3 Answers3

1

check your video card drivers. I had the same issue and installed the latest linux nvidia drivers (nvidia-390) in my case since i have a GTX 970.

https://www.mvps.net/docs/install-nvidia-drivers-ubuntu-18-04-lts-bionic-beaver-linux/

0xMohamed
  • 11
  • 2
0

I got the same issue after updating my nvidia driver to nvidia-390 on Ubuntu 18.10. I removed AVD, rebooted PC and recreated AVD. This steps solved the issue.

Ufkoku
  • 2,384
  • 20
  • 44
0

I had this issue on Ubuntu 18.04 and fixed it by doing exactly the following:

  1. Updating NVidia drivers via:
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
  1. Deleting my AVDs
  2. Rebooting
  3. Creating a new AVD

You could probably skip step 2 and just create a new AVD to use but my old emulators didn't contain anything special so I just blew them all away because sometimes emulator problems impact all previously created emulators. So I feel better making fresh ones rather than trying to remember which are out-dated.

Prior to rebooting, I also took these related steps which probably did not directly fix the problem but are still worth mentioning:

  • updated my environment (via .zshrc in my case) to use $ANDROID_SDK_ROOT instead of $ANDROID_HOME, which has been deprecated.
  • put the 'new' emulator location ($ANDROID_SDK_ROOT/emulator/) earlier in my PATH than the 'old' location ($ANDROID_SDK_ROOT/tools/) , per this post.
gMale
  • 17,147
  • 17
  • 91
  • 116