Launching AVDs from both android studio and via the cli "emulator" command fails.
(the emulator did launch successfully on one single occasion)
Steps taken:
- Create a pixel 6 avd
- Install system image
- Select avd from device manager
- System tray reads "Starting avd" emulator window reads "connecting to emulator"
- Emulator does not launch.
Attempted fixes:
- Wiped avd data "wipe data"
- Cold booting avd "cold boot"
- Toggle "emulated performance" between "Hardware", "Software" and "Automatic"
- Delete and reinstall avds
- kill adb server with "kill server"
- Attempt to launch via
emulator
cli commandemulator -list-avds
returns:
INFO | Storing crashdata in: /tmp/android-skyjuice/emu-crash-34.2.13.db, detection is enabled for process: 5302
- Uninstall and reinstall Android Studio
- Add /sdk, /platform-tools, /emulator, tools/bin, to my
PATH
Android emulator, sdk 14, android SDK build tools, Android SDK Platform tools are all installed in android studio.
idea.log
2024-05-09 16:10:02,713 [ 142492] INFO - Emulator: Pixel 6 - Not yet booted
2024-05-09 16:10:05,650 [ 145429] INFO - Emulator: Pixel 6 - Displaychange event: 0
2024-05-09 16:10:05,650 [ 145429] INFO - Emulator: Pixel 6 - Display notification event: event: DISPLAY_CONFIGURATIONS_CHANGED_UI displayConfigurationsChangedNotification { displayConfigurations { displays { width: 1080 height: 2400 dpi: 420 } userConfigurable: 3 maxDisplays: 11 } }
2024-05-09 16:10:05,652 [ 145431] INFO - #com.android.tools.idea.streaming.emulator.EmulatorView - Received notification: event: DISPLAY_CONFIGURATIONS_CHANGED_UI displayConfigurationsChangedNotification { displayConfigurations { displays { width: 1080 height: 2400 dpi: 420 } userConfigurable: 3 maxDisplays: 11 } }
2024-05-09 16:10:15,642 [ 155421] WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/streamNotification call failed - UNAVAILABLE: Network closed for unknown reason
2024-05-09 16:10:15,642 [ 155421] WARN - #com.android.tools.idea.streaming.emulator.EmulatorController - android.emulation.control.EmulatorController/streamScreenshot call failed - UNAVAILABLE: Network closed for unknown reason
2024-05-09 16:10:15,644 [ 155423] INFO - #com.android.tools.idea.streaming.emulator.EmulatorController - Disconnected from Pixel 6 (5554)
2024-05-09 16:10:15,724 [ 155503] INFO - Emulator: Pixel 6 - Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
2024-05-09 16:10:15,724 [ 155503] WARN - Emulator: Pixel 6 - Emulator terminated with exit code 139
2024-05-09 16:10:15,897 [ 155676] INFO - #com.android.tools.idea.adb.AdbService - Device [emulator-5554] is offline
2024-05-09 16:10:26,642 [ 166421] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities to files
2024-05-09 16:10:41,411 [ 181190] INFO - #c.i.u.t.DateFormatUtil - cannot load system formats (JNA=true), resorting to JRE for en_US
2024-05-09 16:11:18,215 [ 217994] WARN - #c.i.o.a.ActionStub - ActionGroup should be registered using <group> tag: id="Android.CreateResourcesActionGroup" class="org.jetbrains.android.actions.CreateResourceFileActionGroup"
2024-05-09 16:11:18,560 [ 218339] WARN - #c.i.i.a.CopyTBXReferenceAction - Cannot find TBX tool for IDE: AndroidStudio
2024-05-09 16:11:36,265 [ 236044] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities to files
2024-05-09 16:11:36,313 [ 236092] INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=Greeting Card, containerState=COMPONENT_CREATED, componentStore=/home/user/AndroidStudioProjects/GreetingCard)KotlinCommonCompilerArguments took 11 ms
System
Android Studio Jellyfish | 2023.3.1
archlinux – android-studio installed via AUR
2
Answers
Part One
"Show on Disk" from the avd device manager revealed the avd's were being created in .config/.android/avd.
Set the ANDROID_AVD_HOME environment variable to that location.
~/.bash_profile
export ANDROID_AVD_HOME="~/.config/.android/avd"
After I was able to successfully run an avd with
emulator -avd Pixel_6 -gpu host
Part two: Switched the avd's "Emulated Performance" to "Graphics: Hardware"
All avds now work without issues.
I have the same problem with Jellyfish on Windows 10. It appears with all my AVDs, and even after wiping them or creating a new one.
I often see the following window. In the details, it says something like
This does not help me a lot …