Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.2.1
-
None
-
iOS
Android
Description
On Android the errors look like this
qrc:///demos/samegame/samegame.qml:43 ((null)): qrc:///demos/samegame/samegame.qml:43:1: Script qrc:///demos/samegame/content/samegame.js unavailable
qrc:///demos/samegame/content/samegame.js:42 ((null)): qrc:///demos/samegame/content/samegame.js:42:1: module "QtQuick.LocalStorage" plugin "qmllocalstorageplugin" not found
On iOS, it helps to do the import additionally in a QML file (even though the QML doesn't use it), because it needs to be detected and packaged. But the game still doesn't run normally. Then the errors are
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:
QSqlQuery::prepare: database not open
qrc:///demos/samegame/content/samegame.js:475: Error: Driver not loaded Driver not loaded
On Android, localstorage is actually installed though:
/data/data/org.qtproject.example.samegame/qt-reserved-files/qml/QtQuick/LocalStorage
/data/data/org.qtproject.example.samegame/qt-reserved-files/qml/QtQuick/LocalStorage/qmldir
/data/data/org.qtproject.example.samegame/qt-reserved-files/qml/QtQuick/LocalStorage/plugins.qmltypes
/data/data/com.android.browser/app_databases/localstorage
/data/data/com.android.browser/app_databases/localstorage/data/local/tmp/qt/qml/QtQuick/LocalStorage
/data/local/tmp/qt/qml/QtQuick/LocalStorage/libqmllocalstorageplugin.so
/data/local/tmp/qt/qml/QtQuick/LocalStorage/plugins.qmltypes
/data/local/tmp/qt/qml/QtQuick/LocalStorage/qmldir
On desktop platforms the game is still OK. And I remember this game running on Android in the past, although it was quite slow to start.
Attachments
Issue Links
- is replaced by
-
QTBUG-35349 QML import scanner doesn't pick up imports in js files
- Closed