Unsolved Errors when running by an x86 emulator
-
Hi all,
For being familiar with Qt Quick I began to read this example until it says "Press Ctrl+R to run the application" before the Adding Animation to the View section.
I ran by Desktop kit => Good.
Then ran by an x86 AVD => after starting the emulator I opened it => The screen of the app on the emulator is showing nothing and I got the following errors in *Application Output" window "org.qtobject.example. transitions" part:
Starting remote process.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:
W linker : /data/app/org.qtproject.example.transitions-1/lib/x86/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.transitions-1/lib/x86/libQt5Qml.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.transitions-1/lib/x86/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.transitions-1/lib/x86/libQt5Quick.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.transitions-1/lib/x86/libQt5QuickParticles.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example.transitions-1/lib/x86/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/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.transitions/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
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.
W gralloc_ranchu: Gralloc pipe failed
D : HostConnection::get() New Host Connection established 0x8bfaf480, tid 2257
D : HostConnection::get() New Host Connection established 0x8bfaf6c0, tid 2276
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 1
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/qml/QtQuick.2/libqtquick2plugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/qml/QtQuick/Controls/libqtquickcontrolsplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/qml/QtQuick/Dialogs/libdialogplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/qml/QtQuick/Window.2/libwindowplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/qml/QtQuick/Layouts/libqquicklayoutsplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/qml/QtQuick/Controls/Styles/Android/libqtquickcontrolsandroidstyleplugin.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqgif.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqicns.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqico.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqjpeg.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqtga.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqtiff.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqwbmp.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example.transitions/qt-reserved-files/plugins/imageformats/libqwebp.so: unsupported flags DT_FLAGS_1=0x81
D : HostConnection::get() New Host Connection established 0x8a0de440, tid 2277
D : HostConnection::get() New Host Connection established 0x8a0de7c0, tid 2283
W libtransitions.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
03-01 01:32:35.384 2257 2283 W libtransitions.so:
W libtransitions.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libtransitions.so: #define lowp
W libtransitions.so: #define mediump
W libtransitions.so: #define highp
W libtransitions.so: #line 1
W libtransitions.so: varying lowp vec4 color;
03-01 01:32:35.384 2257 2283 W libtransitions.so:
W libtransitions.so: void main()
W libtransitions.so: {
W libtransitions.so: gl_FragColor = color;
W libtransitions.so: }
W libtransitions.so: ***
W libtransitions.so: (null):0 ((null)): shader compilation failed:
W libtransitions.so: ""
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
03-01 01:32:35.388 2257 2283 W libtransitions.so:
W libtransitions.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libtransitions.so: #define lowp
W libtransitions.so: #define mediump
W libtransitions.so: #define highp
W libtransitions.so: #line 1
W libtransitions.so: varying highp vec2 qt_TexCoord;
03-01 01:32:35.388 2257 2283 W libtransitions.so:
W libtransitions.so: uniform sampler2D qt_Texture;
03-01 01:32:35.388 2257 2283 W libtransitions.so:
W libtransitions.so: void main()
W libtransitions.so: {
W libtransitions.so: gl_FragColor = texture2D(qt_Texture, qt_TexCoord);
W libtransitions.so: }
W libtransitions.so: ***
W libtransitions.so: (null):0 ((null)): shader compilation failed:
W libtransitions.so: ""
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
03-01 01:32:35.428 2257 2283 W libtransitions.so:
W libtransitions.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libtransitions.so: #define lowp
W libtransitions.so: #define mediump
W libtransitions.so: #define highp
W libtransitions.so: #line 1
W libtransitions.so: varying lowp vec4 color;
03-01 01:32:35.428 2257 2283 W libtransitions.so:
W libtransitions.so: void main()
W libtransitions.so: {
W libtransitions.so: gl_FragColor = color;
W libtransitions.so: }
W libtransitions.so: ***
W libtransitions.so: (null):0 ((null)): shader compilation failed:
W libtransitions.so: ""
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
03-01 01:32:35.431 2257 2283 W libtransitions.so:
W libtransitions.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libtransitions.so: #define lowp
W libtransitions.so: #define mediump
W libtransitions.so: #define highp
W libtransitions.so: #line 1
W libtransitions.so: varying highp vec2 qt_TexCoord;
03-01 01:32:35.431 2257 2283 W libtransitions.so:
W libtransitions.so: uniform sampler2D qt_Texture;
03-01 01:32:35.431 2257 2283 W libtransitions.so:
W libtransitions.so: void main()
W libtransitions.so: {
W libtransitions.so: gl_FragColor = texture2D(qt_Texture, qt_TexCoord);
W libtransitions.so: }
W libtransitions.so: ***
W libtransitions.so: (null):0 ((null)): shader compilation failed:
W libtransitions.so: ""
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
03-01 01:32:35.464 2257 2283 W libtransitions.so:
W libtransitions.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libtransitions.so: #define lowp
W libtransitions.so: #define mediump
W libtransitions.so: #define highp
W libtransitions.so: #line 1
W libtransitions.so: varying lowp vec4 color;
03-01 01:32:35.464 2257 2283 W libtransitions.so:
W libtransitions.so: void main()
W libtransitions.so: {
W libtransitions.so: gl_FragColor = color;
W libtransitions.so: }
W libtransitions.so: ***
W libtransitions.so: (null):0 ((null)): shader compilation failed:
W libtransitions.so: ""
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
W libtransitions.so: (null):0 ((null)): QOpenGLShader::compile(Fragment): ERROR: 0:1: '' : No precision specified for (float)
03-01 01:32:35.468 2257 2283 W libtransitions.so:
W libtransitions.so: (null):0 ((null)): *** Problematic Fragment shader source code ***
W libtransitions.so: #define lowp
W libtransitions.so: #define mediump
W libtransitions.so: #define highp
W libtransitions.so: #line 1
W libtransitions.so: varying highp vec2 qt_TexCoord;
03-01 01:32:35.468 2257 2283 W libtransitions.so:
W libtransitions.so: uniform sampler2D qt_Texture;
03-01 01:32:35.468 2257 2283 W libtransitions.so:
W libtransitions.so: void main()
W libtransitions.so: {
W libtransitions.so: gl_FragColor = texture2D(qt_Texture, qt_TexCoord);
W libtransitions.so: }
W libtransitions.so: ***
W libtransitions.so: (null):0 ((null)): shader compilation failed:
W libtransitions.so: ""
W libtransitions.so: (null):0 ((null)): QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linkedWhy is the problem that the emulator doesn't show the result as the Desktop kit please?
-
@tomy I don't have my Android development environment at hand here, but you should check the configuration of your emulator: is there something related to graphics (especially acceleration) you can activate?
-
I also tried this example. The same result!
What configuration of the emulator should I check? Do you mean the config.ini file of that AVD? If so, it is this way:
avd.ini.encoding=UTF-8
abi.type=x86
disk.dataPartition.size=200M
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera.front=none
hw.cpu.arch=x86
hw.dPad=no
hw.device.hash2=MD5:d3c9ed02af441ec949711439b9a48b85
hw.device.manufacturer=Google
hw.device.name=Nexus 7
hw.gps=yes
hw.keyboard=yes
hw.lcd.density=213
hw.mainKeys=no
hw.ramSize=1024MB
hw.sdCard=no
hw.sensors.orientation=yes
hw.sensors.proximity=no
hw.trackBall=no
image.sysdir.1=system-images\android-24\default\x86
skin.dynamic=yes
skin.name=800x1280
skin.path=800x1280
tag.display=Default
tag.id=default
vm.heapSize=32I removed the previous AVD and created this one with the same configurations, but this one is very slow!
-
@tomy See if https://forum.qt.io/topic/75374/qml-import-could-not-be-resolved-any-of-the-import-paths-qtquick-controls-material-impl/4 and https://forum.qt.io/topic/72424/blank-screen-with-android-emulator-win10-android-x86-image/3 and https://forum.qt.io/topic/72071/qt5-7-android-stopped-working-after-a-studio-updates/6 help.
-
Using a command prompt I went to the Tools folder of SDK. Then click on the Run on Qt Creator (with the project opened) but didn't choose the AVD, rather I typed this command:
emulator -avd Nexus_7_x86 -gpu swiftshader
on the command line and hit enter. This was the result: -
mmh,
I'm not very familiar with QML, but if I remember correctly, one of its requierements is the use of openGL on the target device.In the screenshot it says for the x86 device, openGL disabled .
Might be the problem !?
-
OK, how to enable it?
Maybe "is not linked" means it's disabled. -
like I said, i have used the emulator like 3 and it never worked for me like i wanted it to, but
SGaist wrote here in a very old topic about, it maybe he can help you more :)
@SGaist said in How to enable OpenGL:
Hi,
IIRC (might be old so…) there was somewhere a configuration option for the emulator to activate OpenGL. It might be only available for the x86 emulator though.
Hope it helps
-
@tomy Are you sure you have the x86 version active in Qt Creator? It looks like you're trying to run arm binary in x86 emu.
Also, I have had several problems with the Android SDK emulator. Sometimes I had to recreate the configurations from scratch. Also had some problems with certain Android OS versions (or maybe Android OS version/emulator version incompatibilities) so that some error message keeps appearing in the Android screen and I had to skip some Android OS versions. A painful experience, this emulator. It's easier to get some old used devices instead. Or to use a commercial emulator as someone suggested.
-
@J.Hilk
I agree with you that the emulator never worked for me well and never will, too. If I collect all the money paid for the traffic I buy for downloading the SDK, I likely can buy a real Samsung device for real testing :-)there was somewhere a configuration option for the emulator to activate OpenGL.
It's very vague for me.
-
@Eeli-K
Yes, I think buying a real android device (for example a second-hand Samsung Galaxy) that is bale to be updated for each new version, is the best solution.