amrsa1 / Android-Emulator-image

The use of this Docker image simplifies the process of running an Android emulator within a Docker container
MIT License
97 stars 48 forks source link

Error about Qt lib when running the emulator #29

Open pawlakmaly opened 1 month ago

pawlakmaly commented 1 month ago

Hi all,

I've clone the repo and tried to run build the docker image, but I get this error:

androidHeaded  | Available platform plugins are: vnc, linuxfb, xcb, offscreen, minimal.
androidHeaded  |  ((null):0, (null))
androidHeaded  | INFO    | Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
androidHeaded  | 
androidHeaded  | Available platform plugins are: vnc, linuxfb, xcb, offscreen, minimal.
androidHeaded  |  ((null):0, (null))
androidHeaded  | [16:16:20240808,073244.013063:ERROR elf_dynamic_array_reader.h:64] tag not found
androidHeaded  | [16:16:20240808,073244.014102:ERROR process_memory_range.cc:75] read out of range
androidHeaded  | [16:16:20240808,073244.019348:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
androidHeaded  | [16:16:20240808,073244.019482:ERROR file_io_posix.cc:144] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
androidHeaded  | [16:16:20240808,073244.020390:ERROR process_memory_range.cc:75] read out of range
androidHeaded  | [16:16:20240808,073244.021940:ERROR process_memory_range.cc:75] read out of range
androidHeaded  | ./start_emu.sh: line 9:     7 Aborted                 emulator -avd "${emulator_name}" -no-boot-anim -gpu off

My system: win 11, WSL2, Ubuntu 22.04

amrsa1 commented 3 weeks ago

Sounds like a windows issue, take a look here: https://www.stellarinfo.com/blog/no-qt-platform-plugin-could-be-initialized-error/

olivluca commented 3 weeks ago

Same error here, but the container is debian, so I don't understand what windows has to do here (besides, my host is linux)

olivluca commented 3 weeks ago

If I start the emulator from inside vnc it works

olivluca commented 3 weeks ago

ok, it's missing the display, I added a

DISPLAY=:1
export DISPLAY

to the script and it works.