Qt5.7 Android stopped working after A. Studio updates
-
I just updated Android Studio and a bunch of SDK packages. Now when I build and run an application with QtCreator, in startup it gives only a blank (white, using default Controls2 style) screen. I reconfigured the project and even re-installed Android Studio from scratch. Here are some error lines from Application Output:
W/System.err( 2943): java.lang.ClassNotFoundException: android.graphics.drawable.RippleDrawable
W/System.err( 2943): Caused by: java.lang.ClassNotFoundException: android.graphics.drawable.RippleDrawable
W/System.err( 2943): java.lang.NoSuchFieldException: View_paddingStart
W/EGL_emulation( 2943): eglSurfaceAttrib not implementedD/OpenGLRenderer( 2943): Enabling debug mode 0
The program initializes normally, gives c++ and qml debuggin output.
Then...
W/EGL_emulation( 2943): eglSurfaceAttrib not implemented
E/libEGL ( 2943): no more slots for eglGetProcAddress("glUniformMatrix4x3fvNV")
E/libEGL ( 2943): no more slots for eglGetProcAddress("glBlitFramebuffer")
[maybe some hundreds similar]W/libCrCtrl.so( 2943): (null):0 ((null)): unknown 0: QOpenGLShader::compile(Vertex): ERROR: Valid GLSL but not GLSL ES
W/libCrCtrl.so( 2943): (null):0 ((null)): unknown 0: *** Problematic Vertex shader source code ***
W/libCrCtrl.so( 2943): (null):0 ((null)): unknown 0: #define lowp
W/libCrCtrl.so( 2943): #define mediump
W/libCrCtrl.so( 2943): #define highp
W/libCrCtrl.so( 2943): #line 1
W/libCrCtrl.so( 2943): attribute highp vec4 vertexCoord;
W/libCrCtrl.so( 2943): attribute highp vec4 vertexColor;
W/libCrCtrl.so( 2943):
W/libCrCtrl.so( 2943): uniform highp mat4 matrix;
W/libCrCtrl.so( 2943): uniform highp float opacity;
W/libCrCtrl.so( 2943):
W/libCrCtrl.so( 2943): varying lowp vec4 color;
W/libCrCtrl.so( 2943):
W/libCrCtrl.so( 2943): attribute highp float _qt_order;
W/libCrCtrl.so( 2943): uniform highp float _qt_zRange;
W/libCrCtrl.so( 2943): void main()
W/libCrCtrl.so( 2943): {
W/libCrCtrl.so( 2943): gl_Position = matrix * vertexCoord;
W/libCrCtrl.so( 2943): color = vertexColor * opacity;
W/libCrCtrl.so( 2943): gl_Position.z = (gl_Position.z * _qt_zRange + _qt_order) * gl_Position.w;
W/libCrCtrl.so( 2943): }
W/libCrCtrl.so( 2943): (null):0 ((null)): unknown 0: ***And similar is repeated:
W/libCrCtrl.so( 2943): (null):0 ((null)): unknown 0: QOpenGLShader::compile(Fragment): ERROR: Valid GLSL but not GLSL ES
W/libCrCtrl.so( 2943): (null):0 ((null)): unknown 0: *** Problematic Fragment shader source code ***etc...
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: QOpenGLShader::compile(Fragment): ERROR: Valid GLSL but not GLSL ES
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: *** Problematic Fragment shader source code ***
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: #define lowp
W/libCrCtrl.so( 3333): #define mediump
W/libCrCtrl.so( 3333): #define highp
W/libCrCtrl.so( 3333): #line 1
W/libCrCtrl.so( 3333): varying highp vec2 qt_TexCoord;
W/libCrCtrl.so( 3333):
W/libCrCtrl.so( 3333): uniform sampler2D qt_Texture;
W/libCrCtrl.so( 3333): uniform lowp float opacity;
W/libCrCtrl.so( 3333):
W/libCrCtrl.so( 3333): void main()
W/libCrCtrl.so( 3333): {
W/libCrCtrl.so( 3333): gl_FragColor = texture2D(qt_Texture, qt_TexCoord) * opacity;
W/libCrCtrl.so( 3333): }
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: ***
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: QOpenGLShader::link:
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: shader compilation failed:
W/libCrCtrl.so( 3333): "\u0098"
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: QOpenGLShader::link:
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: QOpenGLShaderProgram::uniformLocation( qt_Matrix ): shader program is not linked
W/libCrCtrl.so( 3333): (null):0 ((null)): unknown 0: QOpenGLShaderProgram::uniformLocation( opacity ): shader program is not linkedAfter that ApplicationWindow/Component.onCompleted prints debugging output.
What could have gone wrong? Android build tools broken?
-
@Eeli-K it's like some misconfiguration with OpenGl, in this new A.Studio version, is there anything that possibly have disabled OpenGl or at least misconfigured it?
-
@Julian-Guarin Hardly so, like I said, I re-installed Android Studio and SDK from scratch and reconfigured QtCreator project. I can't be sure about the Android Studio, but I explicitely uninstalled it and deleted all the folders I knew of: the Studio installation, SDK installation, folders from user home folder, AppData. I don't know what still could have left something which could affect OpenGL or anything else. I hope A. Studio doesn't touch windows registry...
-
Emulator doesn't work but at least one real device works.
-
Good news. If I start the emulator from command line (see https://developer.android.com/studio/run/emulator-commandline.html) and use "-gpu swiftshader" option (see "emulator.exe -help"), it works. The GPU setting set through GUI didn't seem to work.