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. Android - using Local Storage
Qt 6.11 is out! See what's new in the release blog

Android - using Local Storage

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 4 Posters 4.8k 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.
  • K Offline
    K Offline
    Krylus
    wrote on last edited by
    #1

    Hi,
    I have trouble importing Local Storage module on my google nexus 7 (2013), Android 4.4. I am using Qt 5.2.0, 3.0.0-rc1.
    Creating a Hello World app

    @import QtQuick 2.0
    import QtQuick.LocalStorage 2.0

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

    I am getting an error when run on my tablet

    @W/Qt (25195): assets:/qml/myappstorage/main.qml:2 ((null)): assets:/qml/myappstorage/main.qml:2:1: module "QtQuick.LocalStorage" plugin "qmllocalstorageplugin" not found @

    Running this app on Windows results in no such error. I am using this only as an example, I already have a .js file which crashes at the same line with same error (again, no trouble running it on Windows)

    @.import QtQuick.LocalStorage 2.0 as SQL@

    Now I have already put a lot of work into that .js file and want to keep working with it. Am I doing something wrong with importing Local Storage module? Is there some kind of a workaround?

    Thanks for answer.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TioRoy
      wrote on last edited by
      #2

      Try to add to your .pro:

      QT += sql

      1 Reply Last reply
      0
      • raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        seems like your qmllocalstorageplugin doesn't get deployed to the device

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • T Offline
          T Offline
          TioRoy
          wrote on last edited by
          #4

          I've faced this problem too.

          Setting verbose log in "Deploy Configuration", shows QtCreator trying to including qmllocalstorageplugin, but it's removing later (dependency).

          Putting QT += sql in .pro resolve my problem.

          Deploy log.....

          .
          .
          .
          Appending dependency from xml: qml/QtQuick/LocalStorage/libqmllocalstorageplugin.so
          Appending dependency from xml: qml/QtQuick/LocalStorage/plugins.qmltypes
          Appending dependency from xml: qml/QtQuick/LocalStorage/qmldir
          .
          .
          .
          -- Skipping C:\Qt\Qt5.2.0RC1\5.2.0-rc1\android_armv7/qml/QtQuick/LocalStorage/libqmllocalstorageplugin.so. It has unmet dependencies: lib/libQt5Sql.so.
          .
          .
          .

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cpbotha
            wrote on last edited by
            #5

            Thank you very much!

            I was struggling with getting libQt5Sensors.so deployed to the device. Initially, adding "QT += sensors" did not help, but after a rebuild and a deploy it worked like a charm!

            [quote author="TioRoy" date="1385996729"]I've faced this problem too.

            Setting verbose log in "Deploy Configuration", shows QtCreator trying to including qmllocalstorageplugin, but it's removing later (dependency).

            Putting QT += sql in .pro resolve my problem.

            Deploy log.....

            .
            .
            .
            Appending dependency from xml: qml/QtQuick/LocalStorage/libqmllocalstorageplugin.so
            Appending dependency from xml: qml/QtQuick/LocalStorage/plugins.qmltypes
            Appending dependency from xml: qml/QtQuick/LocalStorage/qmldir
            .
            .
            .
            -- Skipping C:\Qt\Qt5.2.0RC1\5.2.0-rc1\android_armv7/qml/QtQuick/LocalStorage/libqmllocalstorageplugin.so. It has unmet dependencies: lib/libQt5Sql.so.
            .
            .
            .

            [/quote]

            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