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

"package android.location.altitude does not exist" when building qtpositioning for Android on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • 6.7.0, 6.8.0 FF
    • 6.8
    • Positioning
    • None
    • Kubuntu 22.04
    • 419a1844a (dev), 032e127ad (6.7), d87d4eb6b (6.7.0)

    Description

      [17/94] Building Java objects for QtAndroidPositioning.jar
      FAILED: src/plugins/position/android/jar/CMakeFiles/QtAndroidPositioning.dir/java_compiled_QtAndroidPositioning /home/mitch/dev/qt-dev-android-debug/qtpositioning/src/plugins/position/android/jar/CMakeFiles/QtAndroidPositioning.dir/java_compiled_QtAndroidPositioning 
      cd /home/mitch/dev/qt-dev/qtpositioning/src/plugins/position/android/jar && /usr/bin/cmake -DCMAKE_JAVA_CLASS_OUTPUT_PATH=/home/mitch/dev/qt-dev-android-debug/qtpositioning/src/plugins/position/android/jar/CMakeFiles/QtAndroidPositioning.dir -DCMAKE_JAR_CLASSES_PREFIX= -P /usr/share/cmake-3.22/Modules/UseJava/ClearClassFiles.cmake && /usr/lib/jvm/java-17-openjdk-amd64/bin/javac -source 8 -target 8 -Xlint:unchecked,cast,divzero,fallthrough,overrides,path -classpath /home/mitch/Android/Sdk/platforms/android-33/android.jar -classpath :/home/mitch/dev/qt-dev/qtpositioning/src/plugins/position/android/jar:/home/mitch/dev/qt-dev-android-debug/qtbase/jar:/home/mitch/Android/Sdk/platforms/android-33/android.jar -d /home/mitch/dev/qt-dev-android-debug/qtpositioning/src/plugins/position/android/jar/CMakeFiles/QtAndroidPositioning.dir @/home/mitch/dev/qt-dev-android-debug/qtpositioning/src/plugins/position/android/jar/CMakeFiles/QtAndroidPositioning.dir/java_sources && /usr/bin/cmake -E touch /home/mitch/dev/qt-dev-android-debug/qtpositioning/src/plugins/position/android/jar/CMakeFiles/QtAndroidPositioning.dir/java_compiled_QtAndroidPositioning
      warning: [options] bootstrap class path not set in conjunction with -source 8
      src/org/qtproject/qt/android/positioning/QtPositioning.java:7: error: package android.location.altitude does not exist
      import android.location.altitude.AltitudeConverter;
                                      ^
      src/org/qtproject/qt/android/positioning/QtPositioning.java:75: error: cannot find symbol
          private static AltitudeConverter altitudeConverter = null;
                         ^
        symbol:   class AltitudeConverter
        location: class QtPositioning
      src/org/qtproject/qt/android/positioning/QtPositioning.java:114: error: cannot find symbol
              if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
                                                              ^
        symbol:   variable UPSIDE_DOWN_CAKE
        location: class VERSION_CODES
      src/org/qtproject/qt/android/positioning/QtPositioning.java:116: error: cannot find symbol
                      altitudeConverter = new AltitudeConverter();
                                              ^
        symbol:   class AltitudeConverter
        location: class QtPositioning
      src/org/qtproject/qt/android/positioning/QtPositioning.java:515: warning: [cast] redundant cast to GpsSatellite
                              GpsSatellite sat = (GpsSatellite) it.next();
                                                 ^
      Note: src/org/qtproject/qt/android/positioning/QtPositioning.java uses or overrides a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      4 errors
      2 warnings
      [18/94] Building CXX object src/3rdparty/clip2tri/CMakeFiles/Bundled_Clip2Tri.dir/clip2tri.cpp.o
      [19/94] Building CXX object src/3rdparty/clipper/CMakeFiles/Bundled_Clipper.dir/clipper.cpp.o
      [20/94] Automatic MOC for target positioningquickplugin
      ninja: build stopped: subcommand failed.
      
      mitch@mitch-kubuntu:~/dev$ java --version
      openjdk 17.0.10 2024-01-16
      OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1)
      OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing)
      
      mitch@mitch-kubuntu:~/dev$ ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --list_installed
      [=======================================] 100% Fetch remote repository...       
      Installed packages:
        Path                 | Version       | Description                             | Location            
        -------              | -------       | -------                                 | -------             
        build-tools;31.0.0   | 31.0.0        | Android SDK Build-Tools 31              | build-tools/31.0.0  
        build-tools;34.0.0   | 34.0.0        | Android SDK Build-Tools 34              | build-tools/34.0.0  
        cmdline-tools;latest | 13.0          | Android SDK Command-line Tools (latest) | cmdline-tools/latest
        ndk;25.1.8937393     | 25.1.8937393  | NDK (Side by side) 25.1.8937393         | ndk/25.1.8937393    
        ndk;26.1.10909125    | 26.1.10909125 | NDK (Side by side) 26.1.10909125        | ndk/26.1.10909125   
        platform-tools       | 35.0.0        | Android SDK Platform-Tools              | platform-tools      
        platforms;android-31 | 1             | Android SDK Platform 31                 | platforms/android-31
        platforms;android-33 | 3             | Android SDK Platform 33                 | platforms/android-33
      

      Configure arguments:

      -DCMAKE_BUILD_TYPE=Debug -DFEATURE_developer_build=ON -DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF -DWARNINGS_ARE_ERRORS=OFF -DANDROID_ABI=x86_64 -DANDROID_SDK_ROOT=/home/mitch/Android/Sdk -DCMAKE_TOOLCHAIN_FILE=/home/mitch/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake
      

      Attachments

        Issue Links

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

          Activity

            People

              ivan.solovev Ivan Solovev
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes