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

org.qtproject.qt.android.positioning.QtPositioning.positionUpdated calls non-existent method

    XMLWordPrintable

Details

    • Android
    • c452e9b906 (qt/qtpositioning/dev) ec6775d9c0 (qt/qtpositioning/6.2) 4221bce00b (qt/qtpositioning/6.3) ec6775d9c0 (qt/qtpositioning/6.2.3) 4221bce00b (qt/qtpositioning/6.3.0) ec6775d9c0 (qt/qtpositioning/6.2) ec6775d9c0 (qt/qtpositioning/6.2)
    • Team 1 Foundation_Sprint 48

    Description

      Dear all,

      I am currently porting a mobile app from Qt5 to Qt6. The app monitors the device's geographic position using the C++ classes from the Positioning module. When I run the app in an emulator with Android 7.1.1 (API level 25), the log is filled with hundreds of messages of the following form:

      W System.err: java.lang.NoSuchMethodError: no non-static method "Landroid/location/Location;.hasVerticalAccuracy()Z"
      W System.err: 	at org.qtproject.qt.android.positioning.QtPositioning.positionUpdated(Native Method)
      W System.err: 	at org.qtproject.qt.android.positioning.QtPositioning.onLocationChanged(QtPositioning.java:603)
      W System.err: 	at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:297)
      W System.err: 	at android.location.LocationManager$ListenerTransport.-wrap0(LocationManager.java)
      W System.err: 	at android.location.LocationManager$ListenerTransport$2.handleMessage(LocationManager.java:249)
      W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:102)
      W System.err: 	at android.os.Looper.loop(Looper.java:154)
      W System.err: 	at org.qtproject.qt.android.positioning.QtPositioning$PositioningLooperBase.run(QtPositioning.java:477)
      

      The problem does not show when I run the app under API level 30. I guess that the code fails to check if the method hasVerticalAccuracy() is available under the current API.

      Season's greetings,

      Stefan Kebekus.

      Attachments

        For Gerrit Dashboard: QTBUG-99329
        # Subject Branch Project Status CR V

        Activity

          People

            ivan.solovev Ivan Solovev
            skebekus Stefan Kebekus
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes