QML has dark screen on android device



  • Hi, i develop a program with qt GUI application and it's work correctly(this means android configuration is correct) now i create hello word qt QML application and deploy it on my device(huawei g700 or virtual device) but it show a dark screen to me . any idea for that?



  • Does the device even look like its going to boot up? Does it show the android text?

    Try it on some other AVDs and see if you get the same problem.



  • Hi, this is my project:
    http://upir.ir/1393.2/qml-stegano.rar

    it will have same problem on avd.



  • What are you getting in your application output?



  • it have dark screen on my andorid device or avd but it works on windows.



  • Yep, I get the same thing. Are you using Qt Creator or another IDE? I too am running on Windows.

    I get these errors when I run your code:

    @Starting remote process.D/dalvikvm( 1970): Not late-enabling CheckJNI (already on)
    D/dalvikvm( 1970): GC_CONCURRENT freed 182K, 13% free 2664K/3040K, paused 20ms+0ms, total 22ms
    D/dalvikvm( 1970): GC_CONCURRENT freed 324K, 16% free 2727K/3244K, paused 23ms+1ms, total 25ms
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libgnustl_shared.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libgnustl_shared.so 0xb11351a8
    D/dalvikvm( 1970): No JNI_OnLoad found in /data/data/org.qtproject.example.qml_stegano/lib/libgnustl_shared.so 0xb11351a8, skipping init
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Core.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Core.so 0xb11351a8
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Network.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Network.so 0xb11351a8
    I/Qt ( 1970): Network start
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Qml.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Qml.so 0xb11351a8
    D/dalvikvm( 1970): No JNI_OnLoad found in /data/data/org.qtproject.example.qml_stegano/lib/libQt5Qml.so 0xb11351a8, skipping init
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Gui.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Gui.so 0xb11351a8
    D/dalvikvm( 1970): No JNI_OnLoad found in /data/data/org.qtproject.example.qml_stegano/lib/libQt5Gui.so 0xb11351a8, skipping init
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Quick.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5Quick.so 0xb11351a8
    D/dalvikvm( 1970): No JNI_OnLoad found in /data/data/org.qtproject.example.qml_stegano/lib/libQt5Quick.so 0xb11351a8, skipping init
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5QuickParticles.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5QuickParticles.so 0xb11351a8
    D/dalvikvm( 1970): No JNI_OnLoad found in /data/data/org.qtproject.example.qml_stegano/lib/libQt5QuickParticles.so 0xb11351a8, skipping init
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/qt-reserved-files/plugins/platforms/android/libqtforandroidGL.so 0xb11351a8
    D/dalvikvm( 1970): Added shared lib /data/data/org.qtproject.example.qml_stegano/qt-reserved-files/plugins/platforms/android/libqtforandroidGL.so 0xb11351a8
    I/Qt ( 1970): qt start
    D/dalvikvm( 1970): Trying to load lib /data/data/org.qtproject.example.qml_stegano/lib/libQt5QuickParticles.so 0xb11351a8
    D/dalvikvm( 1970): Trying to load lib /data/app-lib/org.qtproject.example.qml_stegano-1/libqml_stegano.so 0xb11351a8
    D/Qt ( 1970): qml\qqmlengine.cpp:1446 (QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)): QML debugging is enabled. Only use this in a safe environment.
    D/dalvikvm( 1970): Added shared lib /data/app-lib/org.qtproject.example.qml_stegano-1/libqml_stegano.so 0xb11351a8
    D/dalvikvm( 1970): No JNI_OnLoad found in /data/app-lib/org.qtproject.example.qml_stegano-1/libqml_stegano.so 0xb11351a8, skipping init
    D/dalvikvm( 1970): Shared lib '/data/data/org.qtproject.example.qml_stegano/lib/libQt5QuickParticles.so' already loaded in same CL 0xb11351a8
    D/dalvikvm( 1970): GC_CONCURRENT freed 419K, 19% free 2695K/3308K, paused 14ms+0ms, total 16ms
    D/libEGL ( 1970): Emulator without GPU support detected. Fallback to software renderer.
    D/libEGL ( 1970): loaded /system/lib/egl/libGLES_android.so
    D/gralloc_goldfish( 1970): Emulator without GPU emulation detected.
    W/Qt ( 1970): qml\qqmlapplicationengine.cpp:133 (void QQmlApplicationEnginePrivate::_q_finishLoad(QObject*)): QQmlApplicationEngine failed to load component
    W/Qt ( 1970): qml\qqmlapplicationengine.cpp:134 (void QQmlApplicationEnginePrivate::_q_finishLoad(QObject*)): file:///data/data/org.qtproject.example.qml_stegano/files/qml/qml_stegano/main.qml:-1 File not found
    W/Qt ( 1970):
    W/Qt ( 1970): ..\qml_stegano\main.cpp:16 (int main(int, char**)): Error: Your root item has to be a Window.

    "org.qtproject.example.qml_stegano" died.@



  • I use qt qreator 3.0.1. What can i do for them?



  • https://qt-project.org/doc/qtcreator-3.1/creator-quick-tour.html

    Check out number 7, that's where you can see all the different output panes. I clicked on application output and saw the errors.



  • It doesn't seem to be seeing your file... strange to me because it works fine on desktop

    @QQmlApplicationEnginePrivate::_q_finishLoad(QObject*)): file:///data/data/org.qtproject.example.qml_stegano/files/qml/qml_stegano/main.qml:-1 File not found@



  • so why it working on windows?



  • I feel like the file isn't being included when packaged for a Virtual Device. So the question is: How do we ensure a file is being included as part of the package? Obviously I don't know the answer :-(



  • i think i must create qrc file and add my files to it. i will try that and will post every happened. thanks Overtime


Log in to reply
 

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