Android Studio Emulator is not working

I’m having a lot of trouble getting the Android Studio emulator to run on my Linux setup. I’ve tried using both the Flatpak and the tarball releases, but the emulator keeps immediately

Looking at the coredump, it’s throwing a Signal 6 (ABRT) and seems to be crashing during the Qt6 platform integration initialization (createPlatformIntegration). Has anyone run into this or know how to fix the Qt/xcb display issue?

 PID: 5015 (qemu-system-x86)
           UID: 1000 ([username])
           GID: 1000 ([username])
        Signal: 6 (ABRT)
  Command Line: /home/[username]/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 -netdelay none -netspeed full -no-snapstorage -avd Pixel_9_Pro -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
    Executable: /home/[username]/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64
 Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-flatpak-com.google.AndroidStudio-1194668977.scope
          Unit: user@1000.service
     User Unit: app-flatpak-com.google.AndroidStudio-1194668977.scope
         Slice: user-1000.slice
     Owner UID: 1000 ([username])
       Boot ID: [redacted]
    Machine ID: [redacted]
      Hostname: [hostname]
       Message: Process 5015 (qemu-system-x86) of user 1000 dumped core.
                
                Module libQt6XcbQpaAndroidEmu.so.6 without build-id.
                Module libqxcbAndroidEmu.so without build-id.
                Module libQt6DBusAndroidEmu.so.6 without build-id.
                Module libQt6QmlModelsAndroidEmu.so.6 without build-id.
                Module libQt6QuickAndroidEmu.so.6 without build-id.
                Module libQt6PositioningAndroidEmu.so.6 without build-id.
                Module libQt6QuickWidgetsAndroidEmu.so.6 without build-id.
                Module libQt6QmlAndroidEmu.so.6 without build-id.
                Module libc++.so.1 without build-id.
                Module libQt6GuiAndroidEmu.so.6 without build-id.
                Module libQt6CoreAndroidEmu.so.6 without build-id.
                Module libQt6WidgetsAndroidEmu.so.6 without build-id.
                Module libabseil_dll.so without build-id.
                Module libprotobuf.so.28.4.0 without build-id.
                Module libc++.so without build-id.
                Module libQt6SvgWidgetsAndroidEmu.so.6 without build-id.
                Module libQt6SvgAndroidEmu.so.6 without build-id.
                Module libQt6WebEngineCoreAndroidEmu.so.6 without build-id.
                Module libQt6NetworkAndroidEmu.so.6 without build-id.
                Module libQt6WebSocketsAndroidEmu.so.6 without build-id.
                Module libQt6WebEngineWidgetsAndroidEmu.so.6 without build-id.
                Module libQt6WebChannelAndroidEmu.so.6 without build-id.
                Module libtcmalloc_minimal.so.4 without build-id.

                Stack trace of thread 265:
                #0  0x00007fed92e2a952 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x29952)
                #1  0x00007fed93a8eee6 _Z6qAbortv (libQt6CoreAndroidEmu.so.6 + 0x28eee6)
                #2  0x00007fed93a96bc0 _ZNK14QMessageLogger5fatalEPKcz (libQt6CoreAndroidEmu.so.6 + 0x296bc0)
                #3  0x00007fed932d30bf n/a (libQt6GuiAndroidEmu.so.6 + 0x2d30bf)
                #4  0x00007fed932d0cb9 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt6GuiAndroidEmu.so.6 + 0x2d0cb9)
                #5  0x00007fed932d336b _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt6GuiAndroidEmu.so.6 + 0x2d336b)
                #6  0x00007fed93af0025 _ZN23QCoreApplicationPrivate4initEv (libQt6CoreAndroidEmu.so.6 + 0x2f0025)
                #7  0x00007fed932cc6a9 _ZN22QGuiApplicationPrivate4initEv (libQt6GuiAndroidEmu.so.6 + 0x2cc6a9)
                #8  0x00007fed940df186 _ZN19QApplicationPrivate4initEv (libQt6WidgetsAndroidEmu.so.6 + 0x2df186)
                #9  0x00005569f0a988cd n/a (qemu-system-x86_64 + 0x131d8cd)
                #10 0x00005569f0f72b71 n/a (qemu-system-x86_64 + 0x17f7b71)
                #11 0x00005569f0683226 n/a (qemu-system-x86_64 + 0xf08226)
                #12 0x00007fed92e2c975 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2b975)
                #13 0x00007fed92e2ca28 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2ba28)
                #14 0x00005569f04eb7e9 n/a (qemu-system-x86_64 + 0xd707e9)

           UID: 1000 ([username])
           GID: 1000 ([username])
        Signal: 6 (ABRT)
  Command Line: /home/[username]/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 -netdelay none -netspeed full -no-snapstorage -avd Pixel_9_Pro -qt-hide-window -grpc-use-token -idle-grpc-timeout 300
    Executable: /home/[username]/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64
 Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-flatpak-com.google.AndroidStudio-1194668977.scope
          Unit: user@1000.service
     User Unit: app-flatpak-com.google.AndroidStudio-1194668977.scope
         Slice: user-1000.slice
     Owner UID: 1000 ([username])
       Boot ID: [redacted]
    Machine ID: [redacted]
      Hostname: [hostname]
       Message: Process 5015 (qemu-system-x86) of user 1000 dumped core.
                
                Module libQt6XcbQpaAndroidEmu.so.6 without build-id.
                Module libqxcbAndroidEmu.so without build-id.
                Module libQt6DBusAndroidEmu.so.6 without build-id.
                Module libQt6QmlModelsAndroidEmu.so.6 without build-id.
                Module libQt6QuickAndroidEmu.so.6 without build-id.
                Module libQt6PositioningAndroidEmu.so.6 without build-id.
                Module libQt6QuickWidgetsAndroidEmu.so.6 without build-id.
                Module libQt6QmlAndroidEmu.so.6 without build-id.
                Module libc++.so.1 without build-id.
                Module libQt6GuiAndroidEmu.so.6 without build-id.
                Module libQt6CoreAndroidEmu.so.6 without build-id.
                Module libQt6WidgetsAndroidEmu.so.6 without build-id.
                Module libabseil_dll.so without build-id.
                Module libprotobuf.so.28.4.0 without build-id.
                Module libc++.so without build-id.
                Module libQt6SvgWidgetsAndroidEmu.so.6 without build-id.
                Module libQt6SvgAndroidEmu.so.6 without build-id.
                Module libQt6WebEngineCoreAndroidEmu.so.6 without build-id.
                Module libQt6NetworkAndroidEmu.so.6 without build-id.
                Module libQt6WebSocketsAndroidEmu.so.6 without build-id.
                Module libQt6WebEngineWidgetsAndroidEmu.so.6 without build-id.
                Module libQt6WebChannelAndroidEmu.so.6 without build-id.
                Module libtcmalloc_minimal.so.4 without build-id.

                Stack trace of thread 265:
                #0  0x00007fed92e2a952 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x29952)
                #1  0x00007fed93a8eee6 _Z6qAbortv (libQt6CoreAndroidEmu.so.6 + 0x28eee6)
                #2  0x00007fed93a96bc0 _ZNK14QMessageLogger5fatalEPKcz (libQt6CoreAndroidEmu.so.6 + 0x296bc0)
                #3  0x00007fed932d30bf n/a (libQt6GuiAndroidEmu.so.6 + 0x2d30bf)
                #4  0x00007fed932d0cb9 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt6GuiAndroidEmu.so.6 + 0x2d0cb9)
                #5  0x00007fed932d336b _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt6GuiAndroidEmu.so.6 + 0x2d336b)
                #6  0x00007fed93af0025 _ZN23QCoreApplicationPrivate4initEv (libQt6CoreAndroidEmu.so.6 + 0x2f0025)
                #7  0x00007fed932cc6a9 _ZN22QGuiApplicationPrivate4initEv (libQt6GuiAndroidEmu.so.6 + 0x2cc6a9)
                #8  0x00007fed940df186 _ZN19QApplicationPrivate4initEv (libQt6WidgetsAndroidEmu.so.6 + 0x2df186)
                #9  0x00005569f0a988cd n/a (qemu-system-x86_64 + 0x131d8cd)
                #10 0x00005569f0f72b71 n/a (qemu-system-x86_64 + 0x17f7b71)
                #11 0x00005569f0683226 n/a (qemu-system-x86_64 + 0xf08226)
                #12 0x00007fed92e2c975 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2b975)
                #13 0x00007fed92e2ca28 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2ba28)
                #14 0x00005569f04eb7e9 n/a (qemu-system-x86_64 + 0xd707e9)

this seems to work for me

flatpak override --user --env=QT_QPA_PLATFORM=xcb com.google.AndroidStudio

native wayland doesn’t work so i used xwayland