Updating Qml Plugin on Android device
mogrodnik last edited by mogrodnik
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
assetsdirectory (where plugin's QML files are stored) is not updated while updating the APK (using
adb install -rcommand), 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 -rto 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).
mogrodnik last edited by
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.