why my app that run correctly in mingw debug mode can not build in for android device?
-
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
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" } } } }
-
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/3Doesn'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...
-
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 . -
finally i deleted
import QtGraphicalEffects 1.0 import QtMultimedia 5.0
now it worked and built successfully .
and apk file that i created.
http://www.mediafire.com/download/1zcylimkzj2idu2/spiralmyappcompiled4android.apk
thanks for attention