Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61424

Using FileDialog in a QML file causes error at runtime on Android: "qml": no such directory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.9.0 RC, 5.9.0, 5.14.0
    • None
    • Mac OS 10.12.4, Qt 5.9 RC. Qt Creator 4.3.0

       

       
    • Android
    • 9603570d42f3ae28ac2063a19b757531c7d2941e

    Description

      To reproduce:

      1. Open the Qt Quick Controls 2 Gallery example or any other Qt Quick example that runs on Android.

      2. Insert this code under ApplicationWindow in the main QML file:

      FileDialog {
        title: "Please choose a file"
        folder: shortcuts.home
        onAccepted: { Qt.quit(); }
        onRejected: { Qt.quit(); }
        Component.onCompleted: { visible = true; }
      }
      

       3. Compile with the standard GCC 4.9 toolchain and run on a real Android device (in reality the toolchain probably doesn't matter but I have only tested it with GCC 4.9).

      4. At runtime the app will complain (and not start):

      W Gallery : (null):0 ((null)): QQmlApplicationEngine failed to load component
      W Gallery : (null):0 ((null)): qrc:/gallery.qml:61 Type FileDialog unavailable
      W Gallery : file:///data/data/org.qtproject.example.gallery/qt-reserved-files/qml/QtQuick/Dialogs/DefaultFileDialog.qml:49 "qml": no such directory
      

      I have verified that in the build folder where DefaultFileDialog.qml lives indeed the "qml" subdirectory is missing, whereas it's present in the Qt installation folder under. For some reason the androiddeployqt tool doesn't copy it over.

       

       

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              assam Assam Boudjelthia
              xxtrawurst Rafael Spring
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes