android {
qmlcomponents.source = qml/imports
qmlcomponents.target = /
DEPLOYMENTFOLDERS += qmlcomponents
qmlplugins.files = \
qml/plugins/libandroidplugin_1_1.so \
qml/plugins/libqtcomponentsplugin_1_1.so
x86 {
qmlplugins.path = /libs/x86
} else: armeabi-v7a {
qmlplugins.path = /libs/armeabi-v7a
} else {
qmlplugins.path = /libs/armeabi
}
INSTALLS += qmlplugins
}
#ifdef Q_OS_ANDROID
viewer->addImportPath("/imports/");
viewer->engine()->addPluginPath(QDir::homePath()+"/../lib");
#endif
#ifdef Q_OS_ANDROID
viewer->addImportPath("/imports/");
viewer->engine()->addPluginPath(QApplication::applicationDirPath()+"/lib");
#endif
Its still not working for me though...
The components are getting installed now but as soon as the app starts
it crashes instantly with no messages or output of any kind. If I rem
out the com.nokia.android 1.1 import it will load up no problem so its
crashing when it access the plugin, I figure...
Do I need to add any permissions or anything else? Currently I have
android.permission.INTERNET and
android.permission.WRITE_EXTERNAL_STORAGE set.
THANKS!
Jon
You can test armv7a with the emulator so long as you use api 14.
I/Qt JAVA ( 5438): Can't load '/data/data/org.kde.necessitas.ministro/files/qt/lib/libQtSystemInfo.so'
I/Qt JAVA ( 5438): java.lang.SecurityException: Requires DISABLE_KEYGUARD permission
W/Qt ( 6695): file:///imports/com/nokia/android.1.1/PageStackWindow.qml:95:9: Cannot assign to non-existent property "platformInverted"
W/Qt ( 6695): platformInverted: root.platformInverted
I tried to clone the component repo, but that fails with:
git clone https://gitorious.org/~koying/qt-components/android-qt-components
Cloning into android-qt-components...
fatal: https://gitorious.org/~koying/qt-components/android-qt-components/info/refs not found: did you run git update-server-info on the server?
On 01/11/2012 12:50 PM, Maciej P�aza wrote:
>
> Hi.
>
> Can I use Qt Components with ARMv5?
>
> Regards.
Presumably you'd need to compile them yourself then.
git clone git://gitorious.org/~koying/qt-components/android-qt-components
to check out.
Thanks guys. Do you have compiled libs for ARMv5? I have some problems
with my own compilation (QtMobility and QFeedback).
Regards.
--
Maciej Płaza.
assets:/qml/ProvaAndroid/main.qml:2:1: module "com.nokia.android" is not installed
I'm trying all advices here...
TEMPLATE = libTARGET = provaQT += qml quick multimediaCONFIG += qt plugin c++11 consoleCONFIG -= android_installTARGET = $$qtLibraryTarget($$TARGET)uri = com.mycompany.qmlcomponents
# InputSOURCES += \ src1.cpp \
src2.cpp
HEADERS += \ src1.h \ src2.h
##The below is generated automatically by Qt Creator when you create a new "Qt Quick 2 Extension Plugin" project for Android
#Copies the qmldir file to the build directory!equals(_PRO_FILE_PWD_, $$OUT_PWD) { copy_qmldir.target = $$OUT_PWD/qmldir copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" QMAKE_EXTRA_TARGETS += copy_qmldir PRE_TARGETDEPS += $$copy_qmldir.target}
#Copies the qmldir file and the built plugin .so to the QT_INSTALL_QML directoryqmldir.files = qmldirunix { installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) qmldir.path = $$installPath target.path = $$installPath INSTALLS += target qmldir}module com.mycompany.qmlcomponentsplugin provaTEMPLATE = app
QT += qml quick widgets multimedia
CONFIG+= consoleSOURCES += main.cpp
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code modelQML_IMPORT_PATH =# Default rules for deployment.include(deployment.pri)
contains(ANDROID_TARGET_ARCH,armeabi-v7a) { ANDROID_EXTRA_LIBS = \ /opt/Qt/5.3/android_armv7/qml/com/mycompany/qmlcomponents/libprova.so}#include <QApplication>#include <QQmlApplicationEngine>int main(int argc, char *argv[]){ QApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); return app.exec();}