2

I cannot start the (android) emulator64-x86. It always fails with:

--> ./emulator64-x86 -avd loli -gpu off       
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: linuxfb, minimal, offscreen, xcb.

Reinstalling the application may fix this problem.
zsh: abort      ./emulator64-x86 -avd loli -gpu off

Every forum thread I found on thw problem was to run ldd on the emulator64 and the XCB library to check for missing dependencies:

--> ldd emulator64-x86                 
    linux-vdso.so.1 (0x00007ffefb048000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3bfefb5000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f3bfec75000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f3bfe9e9000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3bfe7e5000)
    libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f3bfdf9f000)
    libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f3bfd838000)
    libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f3bfd14d000)
    libQt5Svg.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5 (0x00007f3bfcef8000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3bfcb73000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3bfc828000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f3bfc625000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3bfc407000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3bfc1ef000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3bfbe39000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f3bff1bd000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f3bfbc11000)
    libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f3bfb9e0000)
    libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f3bfb72a000)
    libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f3bfb4f7000)
    libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f3bfb258000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3bfb03e000)
    libicui18n.so.57 => /usr/lib/x86_64-linux-gnu/libicui18n.so.57 (0x00007f3bfabca000)
    libicuuc.so.57 => /usr/lib/x86_64-linux-gnu/libicuuc.so.57 (0x00007f3bfa825000)
    libpcre2-16.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f3bfa5b8000)
    libdouble-conversion.so.1 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007f3bfa3a7000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f3bfa093000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f3bf9e8f000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f3bf9c89000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f3bf9a77000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f3bf97c2000)
    libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f3bf9595000)
    libicudata.so.57 => /usr/lib/x86_64-linux-gnu/libicudata.so.57 (0x00007f3bf7b18000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f3bf78a6000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f3bf7691000)

And for LibXCB:

--> ldd /usr/lib/x86_64-linux-gnu/libxcb.so.1 
    linux-vdso.so.1 (0x00007ffc465d8000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f68c727c000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f68c7076000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f68c6cc0000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f68c6aab000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f68c76a8000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f68c68a3000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f68c6685000)

Additional details:

  • Android emulator version 27.1.7.0 (build_id 4581633) (CL:b5ec07662db0f9d8644e5fbda7040053a8741bfd)
  • Debian SID x64

So it seems that all dependencies are OK. How can I debug that issue further ? Any idea how can I make the emulator work ?

It turned out I can run QT with debug logging:

QT_DEBUG_PLUGINS=1 ./emulator64-x86 -avd loli -gpu off

So I it fails because of:

Cannot load library /home/svetlin/software/android/emulator/lib64/qt/plugins/platforms/libqxcb.so: (/home/svetlin/software/android/emulator/lib64/qt/plugins/platforms/libqxcb.so: symbol _ZN26QPlatformIntegrationPlugin6createERK7QStringRK11QStringList, version Qt_5 not defined in file libQt5Gui.so.5 with link time reference)
  • Today it started working without doing any chnages. – Svetlin Zarev Feb 13 '18 at 7:27
1

I tried every possible solution I could find on the net but I still got:

Cannot load library 
/home/darkstar/android/emulator/lib64/qt/plugins/platforms/libqxcb.so: 
(/lib64/libQt5XcbQpa.so.5: version `Qt_5_PRIVATE_API' not found 
(required by /home/darkstar/android/emulator/lib64/qt/plugins/platforms/libqxcb.so))

This application failed to start because it could not find or load the 
Qt platform plugin "xcb" in "".

The error message is actually misleading. In my '/lib64' folder, I do have a file 'libQt5XcbQpa.so.5' and it links to the shared lib 'libQt5XcbQpa.so.5.10.1'.

This is not the correct version. All of the correct libs are actually stored at:

~/android/emulator/lib64/qt/lib

If you include the above path as part of '$LD_LIBRARY_PATH', the emulator will run.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.