Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. :-1: warning: Warning: QML import could not be resolved in any of the import paths: X
Forum Updated to NodeBB v4.3 + New Features

:-1: warning: Warning: QML import could not be resolved in any of the import paths: X

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 668 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Creaperdown
    wrote on last edited by
    #1

    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:
    809e7029-c136-4284-8718-65b4b1166e1c-image.png
    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?
    TomZT 1 Reply Last reply
    0
    • C Creaperdown

      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:
      809e7029-c136-4284-8718-65b4b1166e1c-image.png
      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?
      TomZT Offline
      TomZT Offline
      TomZ
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      0
      • C Creaperdown referenced this topic on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved