Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android port problem



  • Hello there,
    We are developing a Qt QML based application. It works correctly under Windows and Linux platform. Now I was trying to compile it and run under Android x86 emulated device. I am having a lot of problems... First when compiling:

    Warning: QML import could not be resolved in any of the import paths: RiskData
    Warning: QML import could not be resolved in any of the import paths: UaHandler
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
    

    First 2 are my custom objects. Should I care about those warning?

    Now the Run is a lot worse, a lot of warnings and errors:

    I art     : Not late-enabling -Xcheck:jni (already on)
    W art     : Unexpected CPU variant for X86 using defaults: x86
    W System  : ClassLoader referenced unknown path:
    I QtCore  : Start
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Qml.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Quick.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Multimedia.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5OpcUa.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Xml.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5QuickParticles.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5MultimediaQuick.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5QuickTemplates2.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5QuickControls2.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
    I Qt      : qt started
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so: unsupported flags DT_FLAGS_1=0x81
    I art     : Do partial code cache collection, code=19KB, data=30KB
    I art     : After code cache collection, code=19KB, data=30KB
    I art     : Increasing code cache capacity to 128KB
    I art     : Do partial code cache collection, code=52KB, data=63KB
    I art     : After code cache collection, code=52KB, data=63KB
    I art     : Increasing code cache capacity to 256KB
    D         : HostConnection::get() New Host Connection established 0xa105e7c0, tid 2512
    W         : Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1
    W         : Process pipe failed
    D         : HostConnection::get() New Host Connection established 0xa22b2ec0, tid 2533
    I OpenGLRenderer: Initialized EGL, version 1.4
    W         : Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1
    D OpenGLRenderer: Swap behavior 1
    D EGL_emulation: eglCreateContext: 0x9f30c0a0: maj 2 min 0 rcv 2
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    E linker  : normalize_path - invalid input: "C", the input path should be absolute
    W linker  : Warning: unable to normalize "C"
    E linker  : normalize_path - invalid input: "C", the input path should be absolute
    W linker  : Warning: unable to normalize "C"
    D         : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
    E EGL_emulation: tid 2533: eglSurfaceAttrib(1227): error 0x3009 (EGL_BAD_MATCH)
    W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x91383300, error=EGL_BAD_MATCH
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/plugins/opcua/libopen62541_backend.so: unsupported flags DT_FLAGS_1=0x81"/data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/config/ConfigTemp.ini"
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.so: unsupported flags DT_FLAGS_1=0x81
    W QtThread: type=1400 audit(0.0:102): avc: denied { ioctl } for path="socket:[13398]" dev="sockfs" ino=13398 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
    W QtThread: type=1400 audit(0.0:103): avc: denied { ioctl } for path="socket:[13398]" dev="sockfs" ino=13398 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
    W QtThread: type=1400 audit(0.0:104): avc: denied { ioctl } for path="socket:[13401]" dev="sockfs" ino=13401 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
    W QtThread: type=1400 audit(0.0:105): avc: denied { ioctl } for path="socket:[13401]" dev="sockfs" ino=13401 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.so: unsupported flags DT_FLAGS_1=0x81
    D         : HostConnection::get() New Host Connection established 0xadbfc700, tid 2532
    W         : Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1
    D EGL_emulation: eglCreateContext: 0x8f4f80c0: maj 2 min 0 rcv 2
    D EGL_emulation: eglMakeCurrent: 0x8f4f80c0: ver 2 0 (tinfo 0xadb83500)
    D EGL_emulation: eglMakeCurrent: 0x8f4f80c0: ver 2 0 (tinfo 0xadb83500)
    D EGL_emulation: eglCreateContext: 0x8ece0a60: maj 2 min 0 rcv 2
    D EGL_emulation: eglMakeCurrent: 0x8ece0a60: ver 2 0 (tinfo 0xadb83500)
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    E EGL_emulation: tid 2533: eglSurfaceAttrib(1227): error 0x3009 (EGL_BAD_MATCH)
    W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x91383300, error=EGL_BAD_MATCH
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    E EGL_emulation: tid 2533: eglSurfaceAttrib(1227): error 0x3009 (EGL_BAD_MATCH)
    W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x91383300, error=EGL_BAD_MATCH
    D         : HostConnection::get() New Host Connection established 0x8ec4e600, tid 2539
    W         : Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    D EGL_emulation: eglMakeCurrent: 0x8ece0a60: ver 2 0 (tinfo 0x8ecf5800)
    W linker  : /data/data/org.qtproject.example.ntm_client_win32/qt-reserved-files/plugins/audio/libqtaudio_opensles.so: unsupported flags DT_FLAGS_1=0x81
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    E EGL_emulation: tid 2533: eglSurfaceAttrib(1227): error 0x3009 (EGL_BAD_MATCH)
    W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x91383300, error=EGL_BAD_MATCH
    D EGL_emulation: eglMakeCurrent: 0x9f30c0a0: ver 2 0 (tinfo 0xa22c5850)
    D EGL_emulation: eglMakeCurrent: 0x8ece0a60: ver 2 0 (tinfo 0x8ecf5800)
    D EGL_emulation: eglMakeCurrent: 0x8ece0a60: ver 2 0 (tinfo 0x8ecf5800)
    

    Did I forget about something when creating the app for android? I would appreciate all help


  • Moderators

    @Bremenpl
    there is a known issue for the androideployqt tool to scan QML imports across all qml files and add them to the APK.
    Add all imports to the main qml file to let the androideployqt discover them.
    Maybe this is also the case here.

    Regarding the warnings.
    About what warnings are you talking?

    At least those:

    /data/app/org.qtproject.example.ntm_client_win32-1/lib/x86/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81

    can be ignored (QTBUG-57909)


Log in to reply