Qt Creator stuck repeating Android SDK cmdline-tools update via SDK Manager
-
wrote on 7 Apr 2023, 17:41 last edited by
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 -
wrote on 12 Apr 2023, 08:28 last edited by
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.
-
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.
wrote on 12 Apr 2023, 09:33 last edited byI created a bug report: https://bugreports.qt.io/browse/QTCREATORBUG-29026
-
-
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 -
wrote on 13 Apr 2023, 06:39 last edited by
@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... -
@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...wrote on 13 Apr 2023, 15:02 last edited byI 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 -
-
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.
McKeewrote on 13 Apr 2023, 20:06 last edited by 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.
-
-
@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.
@JoeCFD the Wiki can be such a place or even better, submit an improvement to the documentation.
-
@JoeCFD the Wiki can be such a place or even better, submit an improvement to the documentation.
wrote on 13 Apr 2023, 20:39 last edited by 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-bookEveryone can edit it, but only the moderators or Champions can submit the changes.
-
@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-bookEveryone can edit it, but only the moderators or Champions can submit the changes.
@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.
-
@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.
-
wrote on 29 Sept 2023, 01:51 last edited by
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.
-
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.