简体   繁体   中英

Android emulator on wayland : Emulator terminated with exit code 134

I've got the following error when trying to run android emulator from android studio. I'm on Manjaro (Arch linux) under a wayland graphic manager.

WARN - manager.EmulatorProcessHandler - Emulator terminated with exit code 134

I've tried with many device including Nexus 4 without playstore so that I can tweak RAM to 2GiB and the graphic performance to "software". But nothing do the trick I'm always facing this issue.

After trying to run the emulator from command line ( ~/Android/Sdk/emulator/emulator @Nexus_4_API_25 ), I got this more explicit error:

emulator: INFO: QtLogger.cpp:68: Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

It's related to the QT_QPA_PLATFORM environment variable which must be setted to xcb to force the app to run undex XWayland instead of native wayland.

QT_QPA_PLATFORM=xcb ~/Android/Sdk/emulator/emulator @Nexus_4_API_25

or with android-studio: (including _JAVA_AWT_WM_NONREPARENTING=1 for avoid blank window)

QT_QPA_PLATFORM=xcb _JAVA_AWT_WM_NONREPARENTING=1 android-studio

Hope this can help someone else struggling against this issue.

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