Tried searching but couldn't find anything obvious. Don't know when the change happened, but I can ...
m
Tried searching but couldn't find anything obvious. Don't know when the change happened, but I can no longer start the Android Studio emulator. It just sits spinning forever "Connecting to the Emulator" I'm on Pop!_OS 24.04 using Android Studio Narwhal 4
m
Try deleting your current virtual device and creating a new one. I always do this whenever the emulator is updated. Also I find it necessary to "Cold Boot" the virtual device every morning when I start up Android Studio (otherwise it is very sluggish).
m
Yeah, already tried that. Also tried on two different machines - I think one of them might even have been Pop!_OS 22.04. The details I posted are actually from a completely fresh linux and Android Studio install
m
I have seen that behavior when I tried to start the emulator while Android Studio was busy doing other things on a low memory computer, so I always wait until it is idle, and cold boot the emulator rather than allow it to start it when I click the "Run" button. Also Pop!_OS 24.04 is system76's beta Cosmic desktop which I think uses Wayland instead of X for what that is worth. How is that working for you otherwise? I have a system76 laptop which uses the previous Pop!_OS without a problem.
m
It was definitely working previously on the laptop with Cosmic alpha 6 and 7 and the pre-release Narwhal back in May. I think it stopped working around September on alpha 7, and before I installed Cosmic beta.
A couple of things worth noting: • from the website, it recommends installing some libraries, or which
libncurses5:i386
does not exist. So I installed libncurses6 instead. https://developer.android.com/studio/install?authuser=1#64bit-libs • I installed in
/opt
for all users and provided credentials when creating the desktop/launcher icon. Maybe a permission problem? Is there a way to see any logs of trying to start up an emulator? Otherwise the only message I see is a timeout message box after five minutes of nothing happening.
m
It logs to the file:
1. ~/.cache/Google/AndroidStudio2025.1.4/log/idea.log I suggest before you start Android Studio you
Empty the file by >~/.cache/Google/AndroidStudio2025.1.4/log/idea.log then in a terminal with a big srcoll back you do a: tail -f ~/.cache/Google/AndroidStudio2025.1.4/log/idea.log
It is quite verbose and the logs from starting the emulator will have the word "Emulator" in them.
As for missing a library, it would probably segfault instead of hanging in my experience. You can use the "ldd" command on all of the executables and libraries in the directory "sdk/emulator/" starting with the file "sdk/emulator/emulator" and it will list which library it is using (and complain that it is missing if it does not find one). I have a perl script that I used to get Google's old Eclipse development platform working you can have if doing it by hand is too tedious.
One more thing about libraries, when you install a newer version instead of the one the program want you need to create a symbolic link for the version it wants to the actual library like so:
ln -s libncurses.so.6.1 libncurses.so.5
Then you have to run ldconfig to have it refresh its cache (just rebooting will do this for you saving you from reading the man page for ldconfig).
m
Nice tips. I'll do some investigating. Thanks šŸ¤“
Managed to get a 1000+ line log from the emulator. Not looked in-depth yet, but there are some clues
Copy code
1   │ INFO         | Android emulator version 36.2.11.0 (build_id 14212360) (CL:N/A)
   2   │ INFO         | Graphics backend: gfxstream
   3   │ DEBUG   | Current emulator version 36.2.11 is the same as the required version 36.2.11.
   4   │ INFO         | Found AVD name 'Pixel_8a'
   5   │ INFO         | Found AVD target architecture: x86_64
   6   │ INFO         | argv[0]: './emulator'; program directory: '/home/-redacted-/Android/Sdk/emulator'
   7   │ INFO         | Found systemPath /home/-redacted-/Android/Sdk/system-images/android-36.1/google_apis_playstore/x86_64/
   8   │ DEBUG   | autoconfig: -skin pixel_8a
   9   │ DEBUG   | autoconfig: -skindir /home/-redacted-/Android/Sdk/skins/
  10   │ DEBUG   | init, loading /home/-redacted-/Android/Sdk/emulator/lib/advancedFeatures.ini
  11   │ WARNING      | Please update the emulator to one that supports the feature(s): VulkanVirtualQueue
m
Wayland has problems still with Vulkan especially on Nvidia so that may well be your problem.
An update for the emulator was released today, you might give it a look and then report your problems as a bug. There are already quite a few against Wayland:
šŸ‘ 4