Starting simple application on Android doesn't work
-
I have the simple code:
QQmlApplicationEngine engine; QFile some("/home/creapermann/Programming/Etovex/Librum/src/presentation/main.qml"); auto success = some.open(QFile::ReadOnly); auto path = some.fileName(); QObject::connect( &engine, &QQmlApplicationEngine::objectCreated, &app, [path](QObject* obj, const QUrl& objUrl) { if(obj == nullptr && QUrl(path) == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(path); return QGuiApplication::exec();
This works just fine on desktop (my main.qml file is just showing a red screen) but on android I get:
W liblibrum_arm64-v8a.so: QQmlApplicationEngine failed to load component W liblibrum_arm64-v8a.so: file:///home/creapermann/Programming/Etovex/Librum/src/presentation/main.qml: No such file or directory
Building other applications with the same config works just fine. I am using a absolute path for testing purposes, I wouldn't know why that would be causing an issue.
Does someone have an idea what might be causing this?
-
I have the simple code:
QQmlApplicationEngine engine; QFile some("/home/creapermann/Programming/Etovex/Librum/src/presentation/main.qml"); auto success = some.open(QFile::ReadOnly); auto path = some.fileName(); QObject::connect( &engine, &QQmlApplicationEngine::objectCreated, &app, [path](QObject* obj, const QUrl& objUrl) { if(obj == nullptr && QUrl(path) == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(path); return QGuiApplication::exec();
This works just fine on desktop (my main.qml file is just showing a red screen) but on android I get:
W liblibrum_arm64-v8a.so: QQmlApplicationEngine failed to load component W liblibrum_arm64-v8a.so: file:///home/creapermann/Programming/Etovex/Librum/src/presentation/main.qml: No such file or directory
Building other applications with the same config works just fine. I am using a absolute path for testing purposes, I wouldn't know why that would be causing an issue.
Does someone have an idea what might be causing this?
@Creaperdown this path + file(/home/creapermann/Programming/Etovex/Librum/src/presentation/main.qml) does not exist on Android. Use relative path with QRC or cmake to add qml file to your build.
-