Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to deploy qt5 qml plugin to android?
Forum Updated to NodeBB v4.3 + New Features

How to deploy qt5 qml plugin to android?

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 2.0k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Thomas13
    wrote on last edited by
    #1

    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:
    @W/Qt (23528): assets:/qml/TimeExampleTest/main.qml:2 (): assets:/qml/TimeExampleTest/main.qml:2:1: module "TimeExample" is not installed@

    main.qml:
    @
    import QtQuick 2.0
    import TimeExample 1.0 // import types from the plugin

    Rectangle {
    width: 360
    height: 360
    Text {
    text: qsTr("Hello World")
    anchors.centerIn: parent
    }
    MouseArea {
    anchors.fill: parent
    onClicked: {
    Qt.quit();
    }
    }

    Clock { // this class is defined in QML (imports/TimeExample/Clock.qml)
    
        Time { // this class is defined in C++ (plugin.cpp)
            id: time
        }
    
        hours: time.hour
        minutes: time.minute
    
    }
    

    }
    @

    TimeExampleTest.pro:
    @

    Add more folders to ship with the application, here

    folder_01.source = qml/TimeExampleTest
    folder_01.target = qml
    folder_02.source = /home/artem/Projects/Veedo/Test/build-plugins-Android_for_arm_GCC_4_6_Qt_5_1_0-Debug/imports/TimeExample
    folder_02.target = imports
    DEPLOYMENTFOLDERS = folder_01 folder_02

    Additional import path used to resolve QML modules in Creator's code model

    QML_IMPORT_PATH = /home/artem/Projects/Veedo/Test/build-plugins-Android_for_arm_GCC_4_6_Qt_5_1_0-Debug/imports/TimeExample

    If your application uses the Qt Mobility libraries, uncomment the following

    lines and add the respective components to the MOBILITY variable.

    CONFIG += mobility

    MOBILITY +=

    The .cpp file which was generated for your project. Feel free to hack it.

    SOURCES += main.cpp

    Installation path

    target.path =

    Please do not modify the following two lines. Required for deployment.

    include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
    qtcAddDeployment()

    OTHER_FILES +=
    android/src/org/kde/necessitas/ministro/IMinistro.aidl
    android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
    android/src/org/qtproject/qt5/android/bindings/QtActivity.java
    android/src/org/qtproject/qt5/android/bindings/QtApplication.java
    android/AndroidManifest.xml
    android/version.xml
    android/res/values-ja/strings.xml
    android/res/values-rs/strings.xml
    android/res/values-zh-rTW/strings.xml
    android/res/values-fa/strings.xml
    android/res/values-ru/strings.xml
    android/res/values-fr/strings.xml
    android/res/values-ro/strings.xml
    android/res/values-el/strings.xml
    android/res/values-ms/strings.xml
    android/res/values-nb/strings.xml
    android/res/values-et/strings.xml
    android/res/values-pl/strings.xml
    android/res/values-pt-rBR/strings.xml
    android/res/values-es/strings.xml
    android/res/values-id/strings.xml
    android/res/values-de/strings.xml
    android/res/values-it/strings.xml
    android/res/values-zh-rCN/strings.xml
    android/res/values/strings.xml
    android/res/values/libs.xml
    android/res/layout/splash.xml
    android/res/values-nl/strings.xml
    @

    1 Reply Last reply
    0
    • strahlexS Offline
      strahlexS Offline
      strahlex
      wrote on last edited by
      #2

      Hello,

      I have the same problem. Have you solved it?

      Regards
      Strahlex

      Feel free to check out my website machinekoder.com
      and my pet projects Intellicute and QtQuickVcp

      1 Reply Last reply
      0

      • Login

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