Missing types in QtQml even if I have imported QtQuick in Qt5.15.11 for Android
-
I have an App with the following configurations.
Win32 app with Qt5.15.2.
Android App(API 29) with Qt5.12.6.
Now I am trying to upgrade Qt version to Qt5.15.11 for the Android App.For most of my QML files, I have:
import QtQuick 2.12 import MyPersonalModule 1.0
I have managed to build Qt libs for Android API 29 with r21e NDK and I am trying to integrated it with my Android app. Now my Android app can launch, can read native libs, can find my QML file resources, but cannot start because all types in QtQML are missing, such as QtObject, Connections.
In this document, I found this phrase
//Most clients will never need to use the QtQml import, as all of the types are also provided by the QtQuick namespace which may be imported as follows:
However, this phrase only exists for Qt6.8 and Qt6.2, but not in Qt5.15.
According to documents of QtOject/Connections (5.15), it is necessary to import QtQml 2.15 but all the samples in that page only import QtQuick. Besides, my Win32 app (5.15.6) is running well. So, the necessity of importing QtQml is questionable.
I have hundreds of QML files, I don't want to add "import QtQml 2.15" for all of them. How to fix this? I doubt that it is necessary to import it. I suspect that I did something wrong during building Qt libs or Android app. If it is truly necessary, is there a way reduce the effort? Is it possible to implicitly import QtQml for all of my QML files?