Android QML apps cannot be run in emulator



  • I'm trying to run the Calqlatr demo in the Android ARM-v7 emulator. Qt 5.8 beta, Windows 10 OS.
    The app starts, but prints a whole lot of OpenGL errors and ends up displaying nothing more than a white screen:

    Here's a short exempt from the log:

    W libcalqlatr: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    11-20 19:37:01.140  4812  4852 W libcalqlatr:
    W libcalqlatr: (null):0 ((null)): *** Problematic Fragment shader source code ***
    W libcalqlatr: #define lowp
    W libcalqlatr: #define mediump
    W libcalqlatr: #define highp
    W libcalqlatr: #line 1
    W libcalqlatr: varying lowp vec4 color;
    11-20 19:37:01.140  4812  4852 W libcalqlatr:
    W libcalqlatr: void main()
    W libcalqlatr: {
    W libcalqlatr:     gl_FragColor = color;
    W libcalqlatr: }
    W libcalqlatr: ***
    W libcalqlatr: (null):0 ((null)): shader compilation failed:
    W libcalqlatr: ""
    W libcalqlatr: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    W libcalqlatr: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
    W libcalqlatr: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
    W libcalqlatr: ERROR: 0:4: '' : No precision specified for (float)
    W libcalqlatr: ERROR: 0:5: '' : No precision specified for (float)
    W libcalqlatr: ERROR: 0:6: '' : No precision specified for (float)
    11-20 19:37:01.190  4812  4852 W libcalqlatr:
    W libcalqlatr: (null):0 ((null)): *** Problematic Fragment shader source code ***
    
    ...
    
    11-20 19:37:01.964  4812  4852 W libcalqlatr:
    W libcalqlatr: void main()
    W libcalqlatr: {
    W libcalqlatr:     gl_FragColor = texture2D(qt_Texture, qt_TexCoord);
    W libcalqlatr: }
    W libcalqlatr: ***
    W libcalqlatr: (null):0 ((null)): shader compilation failed:
    W libcalqlatr: ""
    W libcalqlatr: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked
    

    Can this be fixed? I really need to at least launch the app in an emulator, if not debug.



  • The same error. Please help, how to fix?
    Qt 5.7.0, Qt 5.7.1, Reference example



  • Enable OpenGL (tick Use host GPU in emulator properties) and re-test.

    Or a better solution. Install virtualbox and an android-x86 image on it then enjoy it!



  • @Hamed.Masafi said in Android QML apps cannot be run in emulator:

    Use host GPU

    error remains



  • I have the same problem. Using any virtual device that uses the host GPU in the emulator from the Android SDK produces shader compilation errors and virtual devices that don't use the host GPU produce "called unimplemented OpenGL ES API" errors.

    This is terrible because it is essential to test apps on a variety of devices and Android versions. For now, I switched to the commercial Genymotion Android emulator for testing but it would be really nice if Google's amulator would work again.



  • https://bugreports.qt.io/browse/QTBUG-44697

    This issue has been solved in Qt 5.9 Beta 3!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.