Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.12, 5.13.2
-
None
Description
Here's part of my directory:
Resource
/JS
Functions.js
/QML
Main.qml
Main.qml:
import '../JS/Function.js' ad Function
Then I met error while adding QML dependency:
– Adding '(absolute path)/Resource/QML/JS/Function.js' as QML dependency
– Skipping because file does not exist.
When I add the js path to qrc file and change the import path to 'qrc:/Resource/JS/Function.js', I met another error
– Adding '(absolute path)/Resource/QML/Main.qml/qrc:/Resource/JS/Function.js' as QML dependency
– Skipping because file does not exist.
Then I thought the import path was start in 'Resource/QML/Main.qml' instead of 'Resource/QML/', and I changed the import path to '../../JS/Function.js', but still got an error:
– Adding '(absolute path)/Resource/JS/Function.js' as QML dependency
– Skipping because file is in QML root path.
The initial code with import path(using qrc path) could successfully run on Windows 10 with 'Desktop Qt 5.13.2 MSVC2017 64bit' compiling.
My Android compiler:
Android for arm64-v8a (Clang Qt 5.13.2 for Android ARM64-v8a)
JDK: 1.8.0_201
SDK: 26.1.1
NDK: r20b 20.1.5948944
Thanks for helping