简体   繁体   中英

Can't start Android AVD Emulator

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: 在此处输入图片说明

在此处输入图片说明

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.

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/

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM