Hello!

I am trying to import TimeExample Qt Quick Extension Plugin from Qt 5.1.0 android installation.

“libqmlqtimeexampleplugin.so” is built sucessfully in “build-plugins-Android_for_arm_GCC_4_6_Qt_5_1_0-Debug/imports”

Then I created simple Qt Quick2 Application (built-in Elements) from Qt Creator. What should I add to application project file to get QML plugin in output “.apk” package?

Now it says:
Qt Code:
  1. W/Qt (23528): assets:/qml/TimeExampleTest/main.qml:2 (): assets:/qml/TimeExampleTest/main.qml:2:1: module "TimeExample" is not installed
To copy to clipboard, switch view to plain text mode 

main.qml:
Qt Code:
  1. import QtQuick 2.0
  2. import TimeExample 1.0 // import types from the plugin
  3.  
  4. Rectangle {
  5. width: 360
  6. height: 360
  7. Text {
  8. text: qsTr("Hello World")
  9. anchors.centerIn: parent
  10. }
  11. MouseArea {
  12. anchors.fill: parent
  13. onClicked: {
  14. Qt.quit();
  15. }
  16. }
  17.  
  18. Clock { // this class is defined in QML (imports/TimeExample/Clock.qml)
  19.  
  20. Time { // this class is defined in C++ (plugin.cpp)
  21. id: time
  22. }
  23.  
  24. hours: time.hour
  25. minutes: time.minute
  26.  
  27. }
  28. }
To copy to clipboard, switch view to plain text mode 

TimeExampleTest.pro:
Qt Code:
  1. # Add more folders to ship with the application, here
  2. folder_01.source = qml/TimeExampleTest
  3. folder_01.target = qml
  4. folder_02.source = /home/artem/Projects/Veedo/Test/build-plugins-Android_for_arm_GCC_4_6_Qt_5_1_0-Debug/imports/TimeExample
  5. folder_02.target = imports
  6. DEPLOYMENTFOLDERS = folder_01 folder_02
  7.  
  8. # Additional import path used to resolve QML modules in Creator's code model
  9. QML_IMPORT_PATH = /home/artem/Projects/Veedo/Test/build-plugins-Android_for_arm_GCC_4_6_Qt_5_1_0-Debug/imports/TimeExample
  10.  
  11. # If your application uses the Qt Mobility libraries, uncomment the following
  12. # lines and add the respective components to the MOBILITY variable.
  13. # CONFIG += mobility
  14. # MOBILITY +=
  15.  
  16. # The .cpp file which was generated for your project. Feel free to hack it.
  17. SOURCES += main.cpp
  18.  
  19. # Installation path
  20. # target.path =
  21.  
  22. # Please do not modify the following two lines. Required for deployment.
  23. include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
  24. qtcAddDeployment()
  25.  
  26. OTHER_FILES += \
  27. android/src/org/kde/necessitas/ministro/IMinistro.aidl \
  28. android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \
  29. android/src/org/qtproject/qt5/android/bindings/QtActivity.java \
  30. android/src/org/qtproject/qt5/android/bindings/QtApplication.java \
  31. android/AndroidManifest.xml \
  32. android/version.xml \
  33. android/res/values-ja/strings.xml \
  34. android/res/values-rs/strings.xml \
  35. android/res/values-zh-rTW/strings.xml \
  36. android/res/values-fa/strings.xml \
  37. android/res/values-ru/strings.xml \
  38. android/res/values-fr/strings.xml \
  39. android/res/values-ro/strings.xml \
  40. android/res/values-el/strings.xml \
  41. android/res/values-ms/strings.xml \
  42. android/res/values-nb/strings.xml \
  43. android/res/values-et/strings.xml \
  44. android/res/values-pl/strings.xml \
  45. android/res/values-pt-rBR/strings.xml \
  46. android/res/values-es/strings.xml \
  47. android/res/values-id/strings.xml \
  48. android/res/values-de/strings.xml \
  49. android/res/values-it/strings.xml \
  50. android/res/values-zh-rCN/strings.xml \
  51. android/res/values/strings.xml \
  52. android/res/values/libs.xml \
  53. android/res/layout/splash.xml \
  54. android/res/values-nl/strings.xml
To copy to clipboard, switch view to plain text mode