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. Updating Qml Plugin on Android device
Forum Updated to NodeBB v4.3 + New Features

Updating Qml Plugin on Android device

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 322 Views 2 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.
  • M Offline
    M Offline
    mogrodnik
    wrote on last edited by mogrodnik
    #1

    Hi all,
    I'm working on quite complex application that uses QML plugin to provide a style for the application (there are different styles based on application variant).
    QML plugin setup is relatively simple, done according to https://doc.qt.io/qt-5/qtqml-modules-cppplugins.html
    Since we're deploying on Android, I added this plugin to ANDROID_EXTRA_PLUGINS. Everything worked fine, until we found some weird bugs. It turned out that assets directory (where plugin's QML files are stored) is not updated while updating the APK (using adb install -r command), so every time there is a change in any of QML style files, we need to uninstall then clean install the app. While this is OK in dev environment it is not when we'll start deploying the app to the customer and then try to update it. We have no control over this process and Play store behaves more like adb install -r to my knowledge.
    Any ideas on how to solve this issue of updating APK?
    I searched internet and was surprised no one else seemed to encounter this issue. I might be missing some knowledge regarding Android APK deployment process or QML plugin implementation options, so feel free to question that.
    What is weird to me is that looking at how QtQuick is deployed, it should have the same issue, when updating Qt version (we're running 5.12, but preparing to move to 5.14).

    1 Reply Last reply
    1
    • M Offline
      M Offline
      mogrodnik
      wrote on last edited by
      #2

      After some analysis it turned out that assets are updated correctly. The fault was in QML cache - it was preserving old data between application runs and even versions. Our current solution is to clear application cache in every startup.

      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