qt for android run fails in AVD



  • I'm try to run a Hello-world app based on Quick2 QML in AVD(Android Virtual Device),
    here is the problem:

    
    Debugging starts
    I art     : Not late-enabling -Xcheck:jni (already on)
    W art     : Unexpected CPU variant for X86 using defaults: x86
    I art     : Debugger is no longer active
    I art     : Starting a blocking GC Instrumentation
    W System  : ClassLoader referenced unknown path:
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5Qml.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5Quick.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5QuickParticles.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5QuickTemplates2.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libQt5QuickControls2.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
    I Qt      : qt start
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unsupported flags DT_FLAGS_1=0x81
    I art     : Do partial code cache collection, code=16KB, data=30KB
    I art     : After code cache collection, code=16KB, data=30KB
    I art     : Increasing code cache capacity to 128KB
    W linker  : /data/app/org.qtproject.example.CocStategyComm-2/lib/x86/libCocStategyComm.so: unused DT entry: type 0xf arg 0x54f
    D         : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
    I Qt JAVA : DEBUGGER: extra parameters: Bundle[{debug_ping=true, gdbserver_socket=/data/data/org.qtproject.example.CocStategyComm/debug-socket, qml_debug=true, gdbserver_command=/data/data/org.qtproject.example.CocStategyComm/lib/libgdbserver.so --multi +/data/data/org.qtproject.example.CocStategyComm/debug-socket, qmljsdebugger=port:59173,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector, ping_socket=org.qtproject.example.CocStategyComm.ping_pong_socket}]
    I Qt JAVA : DEBUGGER: removing gdb socket /data/data/org.qtproject.example.CocStategyComm/debug-socket
    I Qt JAVA : DEBUGGER: starting /data/data/org.qtproject.example.CocStategyComm/lib/libgdbserver.so --multi +/data/data/org.qtproject.example.CocStategyComm/debug-socket
    I Qt JAVA : DEBUGGER: gdbserver started
    I Qt JAVA : DEBUGGER: waiting for socket at /data/data/org.qtproject.example.CocStategyComm/debug-socket, attempt 0
    I Qt JAVA : DEBUGGER: waiting for socket at /data/data/org.qtproject.example.CocStategyComm/debug-socket, attempt 1
    I Qt JAVA : DEBUGGER: socket ok
    I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    I Qt JAVA : DEBUGGER: Debug socket accepted
    I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    Could not load shared library symbols for 139 libraries, e.g. /system/bin/linker.
    Use the "info sharedlibrary" command to see the complete listing.
    Do you need "set solib-search-path" or "set sysroot"?Unable to find dynamic linker breakpoint function.
    GDB will be unable to debug shared library initializers
    and track explicitly loaded dynamic code.I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    I Qt JAVA : DEBUGGER: Incoming socket OK
    I Qt JAVA : DEBUGGER: Got pid acknowledgment
    I Qt JAVA : DEBUGGER: ping not requested
    I Qt JAVA : DEBUGGER: pong not requested
    D         : HostConnection::get() New Host Connection established 0x8bf4e940, tid 3452
    D         : HostConnection::get() New Host Connection established 0x8bf4eb80, tid 3482
    I OpenGLRenderer: Initialized EGL, version 1.4
    D OpenGLRenderer: Swap behavior 1
    W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    D OpenGLRenderer: Swap behavior 0
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/plugins/qmltooling/libqmldbg_server.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/plugins/qmltooling/libqmldbg_debugger.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/plugins/qmltooling/libqmldbg_inspector.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/plugins/qmltooling/libqmldbg_tcp.so: unsupported flags DT_FLAGS_1=0x81
    D libCocStategyComm.so: (null):0 ((null)): QML Debugger: Waiting for connection on port 59173...
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/qml/QtQuick/Layouts/libqquicklayoutsplugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so: unsupported flags DT_FLAGS_1=0x81
    W linker  : /data/data/org.qtproject.example.CocStategyComm/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so: unsupported flags DT_FLAGS_1=0x81
    D         : HostConnection::get() New Host Connection established 0x8ae4af40, tid 3483
    D         : HostConnection::get() New Host Connection established 0x8a0a0e40, tid 3486
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    05-13 19:41:15.537  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libCocStategyComm.so: #define lowp
    W libCocStategyComm.so: #define mediump
    W libCocStategyComm.so: #define highp
    W libCocStategyComm.so: #line 1
    W libCocStategyComm.so: varying lowp vec4 color;
    05-13 19:41:15.538  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: void main()
    W libCocStategyComm.so: {
    W libCocStategyComm.so:     gl_FragColor = color;
    W libCocStategyComm.so: }
    W libCocStategyComm.so: ***
    W libCocStategyComm.so: (null):0 ((null)): shader compilation failed:
    W libCocStategyComm.so: ""
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:4: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:5: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:6: '' : No precision specified for (float)
    05-13 19:41:15.543  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libCocStategyComm.so: #define lowp
    W libCocStategyComm.so: #define mediump
    W libCocStategyComm.so: #define highp
    W libCocStategyComm.so: #line 1
    W libCocStategyComm.so: varying highp vec2 sampleCoord;
    05-13 19:41:15.543  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: uniform mediump sampler2D _qt_texture;
    W libCocStategyComm.so: uniform lowp vec4 color;
    W libCocStategyComm.so: uniform mediump float alphaMin;
    W libCocStategyComm.so: uniform mediump float alphaMax;
    05-13 19:41:15.543  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: void main()
    W libCocStategyComm.so: {
    W libCocStategyComm.so:     gl_FragColor = color * smoothstep(alphaMin,
    W libCocStategyComm.so:                                       alphaMax,
    W libCocStategyComm.so:                                       texture2D(_qt_texture, sampleCoord).a);
    W libCocStategyComm.so: }
    W libCocStategyComm.so: ***
    W libCocStategyComm.so: (null):0 ((null)): shader compilation failed:
    W libCocStategyComm.so: ""
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(textureScale): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMin): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMax): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:4: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:5: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:6: '' : No precision specified for (float)
    05-13 19:41:15.550  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libCocStategyComm.so: #define lowp
    W libCocStategyComm.so: #define mediump
    W libCocStategyComm.so: #define highp
    W libCocStategyComm.so: #line 1
    W libCocStategyComm.so: varying highp vec2 sampleCoord;
    05-13 19:41:15.550  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: uniform mediump sampler2D _qt_texture;
    W libCocStategyComm.so: uniform lowp vec4 color;
    W libCocStategyComm.so: uniform mediump float alphaMin;
    W libCocStategyComm.so: uniform mediump float alphaMax;
    05-13 19:41:15.550  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: void main()
    W libCocStategyComm.so: {
    W libCocStategyComm.so:     gl_FragColor = color * smoothstep(alphaMin,
    W libCocStategyComm.so:                                       alphaMax,
    W libCocStategyComm.so:                                       texture2D(_qt_texture, sampleCoord).a);
    W libCocStategyComm.so: }
    W libCocStategyComm.so: ***
    W libCocStategyComm.so: (null):0 ((null)): shader compilation failed:
    W libCocStategyComm.so: ""
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(textureScale): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMin): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMax): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:4: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:5: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:6: '' : No precision specified for (float)
    05-13 19:41:15.556  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libCocStategyComm.so: #define lowp
    W libCocStategyComm.so: #define mediump
    W libCocStategyComm.so: #define highp
    W libCocStategyComm.so: #line 1
    W libCocStategyComm.so: varying highp vec2 sampleCoord;
    05-13 19:41:15.556  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: uniform mediump sampler2D _qt_texture;
    W libCocStategyComm.so: uniform lowp vec4 color;
    W libCocStategyComm.so: uniform mediump float alphaMin;
    W libCocStategyComm.so: uniform mediump float alphaMax;
    05-13 19:41:15.556  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: void main()
    W libCocStategyComm.so: {
    W libCocStategyComm.so:     gl_FragColor = color * smoothstep(alphaMin,
    W libCocStategyComm.so:                                       alphaMax,
    W libCocStategyComm.so:                                       texture2D(_qt_texture, sampleCoord).a);
    W libCocStategyComm.so: }
    W libCocStategyComm.so: ***
    W libCocStategyComm.so: (null):0 ((null)): shader compilation failed:
    W libCocStategyComm.so: ""
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(textureScale): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMin): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMax): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:4: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:5: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:6: '' : No precision specified for (float)
    05-13 19:41:15.561  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libCocStategyComm.so: #define lowp
    W libCocStategyComm.so: #define mediump
    W libCocStategyComm.so: #define highp
    W libCocStategyComm.so: #line 1
    W libCocStategyComm.so: varying highp vec2 sampleCoord;
    05-13 19:41:15.561  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: uniform mediump sampler2D _qt_texture;
    W libCocStategyComm.so: uniform lowp vec4 color;
    W libCocStategyComm.so: uniform mediump float alphaMin;
    W libCocStategyComm.so: uniform mediump float alphaMax;
    05-13 19:41:15.561  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: void main()
    W libCocStategyComm.so: {
    W libCocStategyComm.so:     gl_FragColor = color * smoothstep(alphaMin,
    W libCocStategyComm.so:                                       alphaMax,
    W libCocStategyComm.so:                                       texture2D(_qt_texture, sampleCoord).a);
    W libCocStategyComm.so: }
    W libCocStategyComm.so: ***
    W libCocStategyComm.so: (null):0 ((null)): shader compilation failed:
    W libCocStategyComm.so: ""
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(textureScale): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMin): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(alphaMax): shader program is not linked
    W libCocStategyComm.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:4: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:5: '' : No precision specified for (float)
    W libCocStategyComm.so: ERROR: 0:6: '' : No precision specified for (float)
    05-13 19:41:15.566  3452  3486 W libCocStategyComm.so:
    W libCocStategyComm.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libCocStategyComm.so: #define lowp
    W libCocStategyComm.so: #define mediump
    W libCocStategyComm.so: #define highp
    W libCocStategyComm.so: #line 1
    
    

    Similar error appears in many Quick2 based demo apps( for example calqlatr demo project),
    while widgets based app has no problem.
    Is it a OpenGL 2.0 supporting problem? how to solve it?

    Mac is set to use high performance Graphical card(disabled auto switch graphical card to save power)
    AVD is set to use hardware - GLES2.0
    android developer options: Force use of GPU for 2D rendering

    environment:
    Mac OS
    qt5.8.0
    android studio 2.3.2



  • I actually had the same problem. What i did was download seperate SDK and NDK from http://wiki.qt.io/Qt_for_Android_known_issues
    And i downloaded apache Ant and set my devices to use it.
    Also i disabled "Host GPU" on my emulator.



  • @dragge I downloaded your provided ndk and sdk tools, tried compile in Android 5.0 api. They can not solve the problem, neither Software - GLES1.1. Thank you all the same.


Log in to reply