1

Im unable to run my android code with studio v3.5 (latest stable; fresh install) on debian 10.

I have created a couple of virtual devices to get going but both fail to bring up the device emulation

I cant seem to find too much information in the public domain about this issue. Seems to be affecting users who've switched to v3.5 recently.

the emulator is looking for a ram.img file under ./android in my home directory. i can see a ram.img.dirty instead. Its a 1 byte file.

I'm trying to run a brand new, blank activity project so it shouldn't be the code that's causing the problem.

1:52 PM Emulator: statvfs('/home/username/.android/avd/Pixel_3_API_24.avd/snapshots/default_boot/ram.img') failed: No such file or directory

1:52 PM Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

directory contents

$ ls -altr
total 12
drwxr--r-- 3 username docker 4096 Sep 22 13:52 ..
-rw-r--r-- 1 username docker    1 Sep 22 13:52 ram.img.dirty
drwxr--r-- 2 username docker 4096 Sep 22 13:52 .

EDIT: Tried Canary. Same error.

I wonder if KVM is causing issues? I'll try to run studio with sudo and see if that helps

/opt/android-sdk$ emulator/emulator @Pixel_3_API_24
statvfs('/home/username/.android/avd/Pixel_3_API_24.avd/snapshots/default_boot/ram.img') failed: No such file or directory
emulator: INFO: QtLogger.cpp:66: Info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. ((null):0, (null))

EDIT: google issue tracker https://issuetracker.google.com/issues/141255618 suggests downgrading emulator as per How to downgrade Android Emulator might help. will try and confirm.

Denounce'IN
  • 95
  • 1
  • 10
  • Linking related post for reference : https://stackoverflow.com/questions/57998293/avd-do-not-work-on-android-studio-statvfs-snapshot-error# – Denounce'IN Sep 24 '19 at 10:36

3 Answers3

1

Seems to be a bug in this version. What worked for me was to install the canary version of AndroidStudio

With this version, the emulator works again.

KCD
  • 678
  • 5
  • 20
  • 1
    Thanks for your suggestion. I'll try this. However, most posts point to this problem existing with both 3.5 as well as canary – Denounce'IN Sep 23 '19 at 06:51
0

Well, 3.5 never worked but the latest canary release worked. But downloading the latest android studio 3.6 canary 12 did not do the trick. the latest studio bundle still fails. i checked for updates. they seem to have released an emulator update. once i restarted with the new updated emulator, things worked as expected. I guess we will soon see this emulator fix in 3.5 and 3.6 studio releases.

Emulator Version 29.2.1 worked.

Denounce'IN
  • 95
  • 1
  • 10
0

The below steps fixed this issue for me:

  1. Update Android Studio
  2. Delete *.lock files in /home/local/parent/user/.android/avd/Pixel_3a_API_24.avd
  3. Wipe Emulator storage a. Go to Tools -> AVD Manager -> Wipe Data ( In actions dropdown )

Tip: Skip the update and try the 2nd and 3rd step, if it still fails, then try update and try again

Arun Joseph
  • 2,736
  • 25
  • 35