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. Online installed Android Qt 6.6 but build requires newer version?
Forum Updated to NodeBB v4.3 + New Features

Online installed Android Qt 6.6 but build requires newer version?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
15 Posts 9 Posters 6.9k Views 2 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.
  • S shokarta

    @JoeCFD yea but i still dont know what to do :( i reported a bug as I think its not correct that fresh qt 6.6.0 asks me for v31:
    66ac7f04-df4e-45ad-a2e3-12de97a1b56e-image.png
    instead of v33 which is not compatible with JDK or NDK or Graddle which QT is trying to use

    JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by JoeCFD
    #6

    @shokarta First, your JDK version 21 may not work(not sure). Even for the latest Android 14, Java 17 is needed. But you have 21. My target Android versions are 12/13. Therefore, I use Java 11.

    Android 	Java 	API and language features supported
    14 (API 34) 	17 	Core libraries
    13 (API 33) 	11 	Core libraries
    12 (API 32) 	11 	Java API
    11 and lower 		Android versions
    

    Better to check the versions of all the packages you use are compatible.

    1 Reply Last reply
    1
    • JoeCFDJ JoeCFD referenced this topic on
    • S Offline
      S Offline
      shokarta
      wrote on last edited by
      #7

      JDK 17 or 11 did not help,
      however what i did is changed version of androidx.core:core in projectfolder/android/build.gradle on line 21:

      from:

      implementation 'androidx.core:core:1.10.1'
      

      to:

      implementation 'androidx.core:core:1.8.0'
      

      thos i didnt try any versions in between like 1.9.0, i tried directly 1.8.0 which worked...

      hope this help someone as Qt 6.6 for me does not like to use API 33

      S 1 Reply Last reply
      0
      • S shokarta has marked this topic as solved on
      • S shokarta

        JDK 17 or 11 did not help,
        however what i did is changed version of androidx.core:core in projectfolder/android/build.gradle on line 21:

        from:

        implementation 'androidx.core:core:1.10.1'
        

        to:

        implementation 'androidx.core:core:1.8.0'
        

        thos i didnt try any versions in between like 1.9.0, i tried directly 1.8.0 which worked...

        hope this help someone as Qt 6.6 for me does not like to use API 33

        S Offline
        S Offline
        shokarta
        wrote on last edited by
        #8

        little update...
        above solution works only with JDK 17... but also removing the line completly works with JDK 17... however if i update back to 21 (like the QT installation video from the link above) then nothing works whatsoever...
        i guess only updating API to 33 would work, which from the issue explanation my Qt 6.6 does not like.

        1 Reply Last reply
        0
        • JoeCFDJ JoeCFD referenced this topic on
        • S Offline
          S Offline
          simranjeetsingh
          wrote on last edited by
          #9

          @shokarta I also had the same issue.
          The following worked for me-

          1. Install Android Build Platform SDK - android-34 from SDK manager.
          2. Install Android Build tools version - 34.0.0 rc3 from SDK manager.
          3. Install OpenJDK 17 (and not higher versions - they are not compatible)
          4. Restart Qt Creator.
          5. Set JDK path.
          6. Set Android Build tools version as 34.0.0 under Projects>Build (Under your Android Qt 6.x.x Clang etc,)>Current Configuration>Build Steps>Build Android APK>Application> ...
          7. Set Android Build Platform SDK as android-34 under Projects>Build (Under your Android Qt 6.x.x Clang etc,)>Current Configuration>Build Steps>Build Android APK>Application> ...
          8. Clean, Rebuild
          C 1 Reply Last reply
          6
          • S Offline
            S Offline
            Samuel Adesola
            wrote on last edited by
            #10

            I had the same issue, I am currently on Qt 6.5.3, I just replace the JDK 21 with JDK 17 and it worked

            J 1 Reply Last reply
            1
            • KenAppleby 0K KenAppleby 0 referenced this topic on
            • SR__S Offline
              SR__S Offline
              SR__
              wrote on last edited by
              #11

              I just want to make it clear for new readers : with current (Qt 6.6, QtCreator 12.0.2) version, you have to do both :

              • use JDK 17 not 21
              • modify your projectfolder/android/build.gradle as stated :
              implementation 'androidx.core:core:1.8.0'
              

              instead of

              implementation 'androidx.core:core:1.10.1'
              

              Not doing any of these lead to errors in my case.
              The error when using Jdk 21 contains :

              javac\debug\classes\org\qtproject\qt\android\bindings\QtLoader$2.class: D8: java.lang.NullPointerException
              
              1 Reply Last reply
              0
              • S Samuel Adesola

                I had the same issue, I am currently on Qt 6.5.3, I just replace the JDK 21 with JDK 17 and it worked

                J Offline
                J Offline
                johny25
                wrote on last edited by
                #12

                @Samuel-Adesola said in Online installed Android Qt 6.6 but build requires newer version?:

                I had the same issue, I am currently on Qt 6.5.3, I just replace the JDK 21 with JDK 17 and it worked

                This solved the same issue I had on Qt 6.6.2.

                1 Reply Last reply
                0
                • S simranjeetsingh

                  @shokarta I also had the same issue.
                  The following worked for me-

                  1. Install Android Build Platform SDK - android-34 from SDK manager.
                  2. Install Android Build tools version - 34.0.0 rc3 from SDK manager.
                  3. Install OpenJDK 17 (and not higher versions - they are not compatible)
                  4. Restart Qt Creator.
                  5. Set JDK path.
                  6. Set Android Build tools version as 34.0.0 under Projects>Build (Under your Android Qt 6.x.x Clang etc,)>Current Configuration>Build Steps>Build Android APK>Application> ...
                  7. Set Android Build Platform SDK as android-34 under Projects>Build (Under your Android Qt 6.x.x Clang etc,)>Current Configuration>Build Steps>Build Android APK>Application> ...
                  8. Clean, Rebuild
                  C Offline
                  C Offline
                  caged
                  wrote on last edited by
                  #13

                  @simranjeetsingh
                  Hii!!
                  I I'm having trouble building my Android app with QT 6.6.1. Despite installing JDK 11 and configuring Android 13 (API 33), I keep getting an error stating that a drawable/icon is not found, even though I've added it to my build directory. Additionally, I'm getting warnings about deprecated Gradle features, making the build incompatible with Gradle 9.0.

                  Could You please help me troubleshoot this issue? I've attached a screenshot for reference.
                  3e6dcd18-0232-4e85-b7f7-62a7b3b3dabf-image.png

                  e1c7ce62-e23a-4c99-9c6b-3a46825ca917-image.png

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    iSolve_Tech
                    wrote on last edited by
                    #14

                    Hi all,

                    while i am trying the android camera facing below error, @i.e.. unable to get the preview of stream.

                    using Android 14
                    sdk version34
                    ndk 26
                    java 17jdk
                    Qt version 6.5.3

                    W QtCamera2: Failed to start preview:android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:1948: The camera device has been disconnected

                    M 1 Reply Last reply
                    0
                    • I iSolve_Tech

                      Hi all,

                      while i am trying the android camera facing below error, @i.e.. unable to get the preview of stream.

                      using Android 14
                      sdk version34
                      ndk 26
                      java 17jdk
                      Qt version 6.5.3

                      W QtCamera2: Failed to start preview:android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:1948: The camera device has been disconnected

                      M Offline
                      M Offline
                      mvuori
                      wrote on last edited by
                      #15

                      @iSolve_Tech You are asking in a solved thread something that has nothing to do with the threads topic

                      1 Reply Last reply
                      0

                      • Login

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