Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. why my app that run correctly in mingw debug mode can not build in for android device?

why my app that run correctly in mingw debug mode can not build in for android device?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
mingwandroidapperror
4 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stackprogramer
    wrote on 24 Mar 2016, 15:52 last edited by stackprogramer 4 Jan 2016, 20:18
    #1

    hi , i designed a simple app,when i tested it debug mode mingw,it work correctly and every thing is nice.with no errors and no warning.
    now i want to build to android apk:
    but when android in emulator works :it returns:please see
    img

    W/EGL_emulation( 1834): eglSurfaceAttrib not implemented
    D/OpenGLRenderer( 1834): Enabling debug mode 0
    W/Qt      ( 1834): qml\qqmlapplicationengine.cpp:133 (void QQmlApplicationEnginePrivate::_q_finishLoad(QObject*)): QQmlApplicationEngine failed to load component
    W/Qt      ( 1834): qml\qqmlapplicationengine.cpp:134 (void QQmlApplicationEnginePrivate::_q_finishLoad(QObject*)): qrc:///main.qml:12 module "QtMultimedia" plugin "declarative_multimedia" not found
    W/Qt      ( 1834): 
    
    

    my app before start only show a white page and nothing.....!!!!!!
    why between debug mingw and android is difference?

    this is source first page:

    
    import QtQuick 2.2
    import QtQuick.Window 2.1
    import QtGraphicalEffects 1.0
    import QtMultimedia 5.0
    Window{
    
        id:menuspiral
        visible: true
        color:"#000"
        title:"Spiral Menu"
        minimumHeight:Screen.desktopAvailableHeight/1.2
        maximumHeight: Screen.desktopAvailableHeight/1.2
        minimumWidth: Screen.desktopAvailableHeight/2
        maximumWidth: Screen.desktopAvailableHeight/2
        x: (Screen.desktopAvailableWidth-width)/2
        y: (Screen.desktopAvailableHeight-height)/2
    
        Loader { id: pageLoader }
    
        /*we define the fonts that is used in game here*/
    
        FontLoader {     id:gamefont
            source: "font/gamecuben.ttf"
        }
    
        FontLoader {
            id:gamefont2
            source: "font/starcraft.ttf"
        }
    
        Image {
    
    
            property string numberFolder:Math.ceil((Math.random()*4))
            source: "img/Fruit"+numberFolder+"th/F"+numberFolder+" ("+Math.ceil(Math.random()*9)+").svg"
            y: (menuspiral.height)/2
            width: 100; height: 100
    
            NumberAnimation on x {
                duration:1600
                loops: Animation.Infinite
                running:true
                from: 0; to:500
            }
        }
        Text {color:"white"
            style: Text.Outline;
            styleColor: "red"
            font.family: gamefont2.name
            font.pointSize:18
            x: (menuspiral.width)/5
            y: (menuspiral.height)/5
    
            text:"<b>Spiral </b>Game v1.0";
    //        Audio {
    //            id: playMusic
    //            source: "1.mp3"
    //        }
    
            anchors.centerIn: parent
            MouseArea {
                anchors.fill: parent
                onClicked: {
    
                    pageLoader.source = "main.qml"
    
                }
    //            onPressed:  { playMusic.play() }
            }
        }
    
        Text {color:"white"
            style: Text.Outline;
            styleColor: "red"
            font.family: gamefont2.name
            font.pointSize:16
            x: (menuspiral.width)/5
            y: (menuspiral.height)/1.8
            text:"<b>About</b>";
    
    
            MouseArea {
                anchors.fill: parent
                onClicked: {
    
                    pageLoader.source = "about.qml"
    
                }
    
            }
        }
    
    
        Text {color:"white"
            style: Text.Outline;
            styleColor: "red"
            font.family: gamefont2.name
            font.pointSize:16
            x: (menuspiral.width)/5
            y: (menuspiral.height)/1.6
            text:"<b>Help</b>";
    
    
            MouseArea {
                anchors.fill: parent
                onClicked: {
    
    
                    pageLoader.source = "help.qml"
    
                }
    
            }
        }
    
    
    
    
    
    }
    
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mvuori
      wrote on 24 Mar 2016, 16:51 last edited by
      #2

      A hint for the future. When you have a similar issue, find the most essential and unique sounding part of the error and search on Google with the environment name and Qt, that is in this case:
      qt android declarative_multimedia

      ...And in a second, Google gives you a list of links. In this case the first one reads:
      [Solved] Android: QtMultimedia Problem | Qt Forum
      module "QtMultimedia" plugin "declarative_multimedia" not found ... Though at project following lines are included but show error at android emulator but not ...
      https://forum.qt.io/topic/35629/solved-android-qtmultimedia-problem/3

      Doesn't it sound familiar?

      And another thing, in the discussion they mention beta versions several times. Always try with the latest non-beta version and also tell what that is...

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stackprogramer
        wrote on 24 Mar 2016, 17:27 last edited by stackprogramer
        #3

        thanks for reply,but this way

        add QT += multimedia 
        

        my problem is not solved. i uses stable version. it return same before.
        my Qt 5.2.1 .

        1 Reply Last reply
        0
        • S Offline
          S Offline
          stackprogramer
          wrote on 27 Mar 2016, 22:15 last edited by stackprogramer 4 Jan 2016, 20:19
          #4

          finally i deleted

          import QtGraphicalEffects 1.0
          import QtMultimedia 5.0
          

          now it worked and built successfully .
          img
          and apk file that i created.
          http://www.mediafire.com/download/1zcylimkzj2idu2/spiralmyappcompiled4android.apk
          thanks for attention

          1 Reply Last reply
          0

          3/4

          24 Mar 2016, 17:27

          • Login

          • Login or register to search.
          3 out of 4
          • First post
            3/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved