:-1: warning: Warning: QML import could not be resolved in any of the import paths: X
Unsolved
Mobile and Embedded
-
I am trying to run my application on Android, but it crashes on startup, while running:
const QUrl url("qrc:/main.qml"); QObject::connect( &engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject* obj, const QUrl& objUrl) { if(obj == nullptr && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url);
I get warnings saying that:
Thus I suspect that the cause of the crash is the engine not being able to find my import paths. I have found multiple mentions of it on the internet, but none of them had a solution.I register my custom types via e.g.:
qmlRegisterSingletonInstance("Librum.controllers", 1, 0, "DictionaryController", dictionaryController);``` in my main.cpp file. Does someone have an idea what might cause this?
-
@Creaperdown start small, have a minimal QML file. If it works, add more stuff until it crashes.
Bisecting like this gets you more information about why it crashes.
-