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

QtPositioning and QtLocation don't deploy correctly on android

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.12.5
    • None
    • Android

      Just added QML Map to my Android application but cannot get it working. QML file:

      import QtQuick 2.9
      import QtQuick.Window 2.3
      import QtPositioning 5.8 //5.6
      import QtLocation 5.11 //5.6
      
      Item {
          id: mItem
          visible: true    
          Rectangle {
              id: mRect
              anchors.fill: parent
              visible: true
              Map {
                  id: map
                  anchors.fill: parent
                  zoomLevel: 14
                  plugin: Plugin {
                      id: mapPlug
                      name: 'osm'
                  }
              }
          }
      }
      
      

      In project I have added

      QT += qml quick location positioning network

      No errors while building and deploying. In running application map appears blank and in console I see:

       : qrc:/map.qml:3:1: module "QtPositioning" is not installed
       : qrc:/map.qml:4:1: module "QtLocation" is not installed
       : qrc:/map.qml:3:1: module "QtPositioning" is not installed
       : qrc:/map.qml:4:1: module "QtLocation" is not installed

      All Android permissions are requested and allowed. Other application positioning functions work well in C++ code (via QGeoPositionInfoSource, QCompass, QGeoCoordinate). The problem appeared only with QML Map. I tried change modules versions and did many other attempts. Not found solution in Internet or QML documentation.

      Development platform - Kubuntu 18.04 LTS.

      PS: Same application build for desktop Kubuntu 18.04 LTS works fine. No such errors but map appears as well. The Qt5 for Android has no necessary modules. This is not covered by docs.

      PPS: I do not know the reason but files ~/Qt5/5.12.5/5.12.5/android_armv7/qml/QtLocation/libdeclarative_location.so and ~/Qt5/5.12.5/5.12.5/android_armv7/qml/QtPositioning/libdeclarative_positioning.so were not copied to application building directory.

      PPPS: Deleting entire app building directory did not help. While build both files were not copied. There is an error somewhere in Qt configuration files.

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

            w00t Robin Burchell
            gourmand64 Gourmet
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes