Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Creator stuck repeating Android SDK cmdline-tools update via SDK Manager
Forum Updated to NodeBB v4.3 + New Features

Qt Creator stuck repeating Android SDK cmdline-tools update via SDK Manager

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
13 Posts 6 Posters 4.6k 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.
  • M Offline
    M Offline
    McKee
    wrote on last edited by
    #1

    I am using Qt 5.15.1 with Qt Creator 8.0.2 on Windows 11, and configuring Android after downloading the JDK, SDK, and OpenSSL. The one step I am stuck on is with SDK Manager, which repeatedly requests to update one component of the SDK, the command line tool package.

    A full write-up of the issue, including screen shots, is on StackOverflow here.

    thanks,
    McKee

    JoeCFDJ 1 Reply Last reply
    1
    • J Offline
      J Offline
      jksdfvbhsld
      wrote on last edited by
      #2

      I have exactly the same problem using Qt Creator 10.0.0 and Qt 6.4.2. I have a complete and working installation of the Android SDK but Qt Creator does not recognize the command line tool correctly. It tries to update it every time, but fails. With this error building for Android is impossible to me.

      Your write-up of the problem on StackOverflow perfectly describes the problem and I hope there will be a solution soon.

      J 1 Reply Last reply
      0
      • J jksdfvbhsld

        I have exactly the same problem using Qt Creator 10.0.0 and Qt 6.4.2. I have a complete and working installation of the Android SDK but Qt Creator does not recognize the command line tool correctly. It tries to update it every time, but fails. With this error building for Android is impossible to me.

        Your write-up of the problem on StackOverflow perfectly describes the problem and I hope there will be a solution soon.

        J Offline
        J Offline
        jksdfvbhsld
        wrote on last edited by
        #3

        I created a bug report: https://bugreports.qt.io/browse/QTCREATORBUG-29026

        1 Reply Last reply
        0
        • J jksdfvbhsld referenced this topic on
        • M McKee

          I am using Qt 5.15.1 with Qt Creator 8.0.2 on Windows 11, and configuring Android after downloading the JDK, SDK, and OpenSSL. The one step I am stuck on is with SDK Manager, which repeatedly requests to update one component of the SDK, the command line tool package.

          A full write-up of the issue, including screen shots, is on StackOverflow here.

          thanks,
          McKee

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

          @McKee are you guys using JDK 17? Does your Android device support it?

          J 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @McKee are you guys using JDK 17? Does your Android device support it?

            J Offline
            J Offline
            jksdfvbhsld
            wrote on last edited by
            #5

            @JoeCFD I don't think the problem is due to a wrong Java version. I have JDK 11 and 17 installed and running Android Apps with Android Studio or using the command line tools manually works without any problems.
            The Android configuration works, it's just not recognized by QCreator...

            M 1 Reply Last reply
            0
            • J jksdfvbhsld

              @JoeCFD I don't think the problem is due to a wrong Java version. I have JDK 11 and 17 installed and running Android Apps with Android Studio or using the command line tools manually works without any problems.
              The Android configuration works, it's just not recognized by QCreator...

              M Offline
              M Offline
              McKee
              wrote on last edited by
              #6

              @jksdfvbhsld
              @JoeCFD

              I resolved the problem via a few steps, but unfortunately I am not sure which of them turned the key. So the following steps were sufficient for me, but not sure they were all necessary. I hope that one of more of them resolves the issue for others.

              • switched from JDK 20 to JDK 17 (comment from @JoeCFD was apt) downloaded from Oracle here and pointed to it with a system environment variable JAVA_HOME = (in my case) C:\Program Files\Java\jdk-17

              • switched from Qt 5.15.1 to 6.5, including porting some code due to library changes, well documented by Qt

              • renamed my Android SDK directory to .old, effectively emptying it (and deleted the .old version later)

              • let Android Studio version Electric Eel, installed previously, discover the missing SDK upon launch and perform the minimal downloads and configuration to get an SDK installed; under SDK Platforms tab: Android SDK platform 33 , and under SDK Tools tab: Android SDK command line tools (latest), Android Emulator, Android SDK Platform-Tools

              • let Qt Creator then complete its required additions to the Android SDE/kit configuration via the usual Edit->Preferences->Devices->Android, having pointed at the JDK and SDK directories.

              I am up and running now with Qt Android building and deploying into the Qt 6.5 Clang arm64-v8a architecture on a Pixel 5a target, and also running the same code on a Desktop PC configuration building with Qt 6.5 MSVC2019 64bit.

              Thanks for the comments in this thread.
              McKee

              JoeCFDJ 1 Reply Last reply
              1
              • M McKee

                @jksdfvbhsld
                @JoeCFD

                I resolved the problem via a few steps, but unfortunately I am not sure which of them turned the key. So the following steps were sufficient for me, but not sure they were all necessary. I hope that one of more of them resolves the issue for others.

                • switched from JDK 20 to JDK 17 (comment from @JoeCFD was apt) downloaded from Oracle here and pointed to it with a system environment variable JAVA_HOME = (in my case) C:\Program Files\Java\jdk-17

                • switched from Qt 5.15.1 to 6.5, including porting some code due to library changes, well documented by Qt

                • renamed my Android SDK directory to .old, effectively emptying it (and deleted the .old version later)

                • let Android Studio version Electric Eel, installed previously, discover the missing SDK upon launch and perform the minimal downloads and configuration to get an SDK installed; under SDK Platforms tab: Android SDK platform 33 , and under SDK Tools tab: Android SDK command line tools (latest), Android Emulator, Android SDK Platform-Tools

                • let Qt Creator then complete its required additions to the Android SDE/kit configuration via the usual Edit->Preferences->Devices->Android, having pointed at the JDK and SDK directories.

                I am up and running now with Qt Android building and deploying into the Qt 6.5 Clang arm64-v8a architecture on a Pixel 5a target, and also running the same code on a Desktop PC configuration building with Qt 6.5 MSVC2019 64bit.

                Thanks for the comments in this thread.
                McKee

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

                @McKee Good one, McKee. Actually in my old posts, I wrote to use Android studio to install SDK related tools and packages. Sure, the proper ENV variables of these packages have to be set as well. These will help set the environment for Android build correctly.
                I guess Only QtCreator is not enough.

                It would be nice to have some places in this forum to let us write things down and other people can simply use them and do not need to spend hours and days to figure things out. Often, the same questions are asked again and again.

                SGaistS 1 Reply Last reply
                0
                • JoeCFDJ JoeCFD

                  @McKee Good one, McKee. Actually in my old posts, I wrote to use Android studio to install SDK related tools and packages. Sure, the proper ENV variables of these packages have to be set as well. These will help set the environment for Android build correctly.
                  I guess Only QtCreator is not enough.

                  It would be nice to have some places in this forum to let us write things down and other people can simply use them and do not need to spend hours and days to figure things out. Often, the same questions are asked again and again.

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @JoeCFD the Wiki can be such a place or even better, submit an improvement to the documentation.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  JoeCFDJ 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    @JoeCFD the Wiki can be such a place or even better, submit an improvement to the documentation.

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

                    @SGaist Look at here:
                    https://wiki.qt.io/Android
                    It is so out of date.

                    I do not think It is a good place to do this. It is not well organized. I would recommend to put more things to a place like here.
                    http://qmlbook.github.io/
                    https://www.qt.io/product/qt6/qml-book

                    Everyone can edit it, but only the moderators or Champions can submit the changes.

                    SGaistS 1 Reply Last reply
                    0
                    • JoeCFDJ JoeCFD

                      @SGaist Look at here:
                      https://wiki.qt.io/Android
                      It is so out of date.

                      I do not think It is a good place to do this. It is not well organized. I would recommend to put more things to a place like here.
                      http://qmlbook.github.io/
                      https://www.qt.io/product/qt6/qml-book

                      Everyone can edit it, but only the moderators or Champions can submit the changes.

                      SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @JoeCFD then you could update and reorganize that wiki page with current information or even create a new one.

                      As for the QML books, AFAIK, their are managed by the authors so you could as well creat patches for them.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      JoeCFDJ 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        @JoeCFD then you could update and reorganize that wiki page with current information or even create a new one.

                        As for the QML books, AFAIK, their are managed by the authors so you could as well creat patches for them.

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

                        @SGaist Joint effort is required here. One person can not do much.

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jacraig
                          wrote on last edited by
                          #12

                          Hopefully this can help someone who arrives here, even though OP solved the problem eventually. How I solved this problem (with Qt Creator 11.0.2 and 5.15.15) is that in the directory [Android SDK]/cmdline-tools I deleted everything but the "latest" directory (including source.properties which listed old version of cmdline-tools). I think even though the "latest" directory is there and latest version installed, Qt was seeing the older version in that higher directory and that was confusing it. As soon as I deleted that, Qt recognized everything as OK on the devices page of prefs and the Android kits became available.

                          K 1 Reply Last reply
                          1
                          • J jacraig

                            Hopefully this can help someone who arrives here, even though OP solved the problem eventually. How I solved this problem (with Qt Creator 11.0.2 and 5.15.15) is that in the directory [Android SDK]/cmdline-tools I deleted everything but the "latest" directory (including source.properties which listed old version of cmdline-tools). I think even though the "latest" directory is there and latest version installed, Qt was seeing the older version in that higher directory and that was confusing it. As soon as I deleted that, Qt recognized everything as OK on the devices page of prefs and the Android kits became available.

                            K Offline
                            K Offline
                            Kam.
                            wrote on last edited by
                            #13

                            @jacraig You just saved me. thanks a lot!!

                            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