TLS initialization failed: Downloading Android SDK Tools
-
I am developing a small game for android. My computer is currently running on Linux. When ever I go to tools. Android settings and then set up SDK I get the following error.
Downloading Android SDK Tools from URL https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip has failed: TLS initialization failed.
I then proceeded to follow the link and extract the zip file myself. However qt creator can't see that I have done this. Even when I browse to the path where the SDK is installed.
-
I downloaded the ZIP file mentioned, extracted it to Android SDK location, but into "latest" subdirectory (when I tried to execute bin/sdkmanager, it complained about nonstandard location, so I repaired like this). This results in "Android/Sdk/cmdline-tools/latest/bin" directory.
Second thing I had to do was downloading OpenJDK 11. My local copy is writable (the Ubuntu's global install is not).
After these two steps, the rest of the Qt automated process started to work.
-
The TLS error comes from the fact that Qt is being built against Open SSL 1.1 and Ubuntu comes with Open SSL 3 and they are incompatible. See QTCREATORBUG-28397
Not able to setup Android SDK on Ubuntu 22.04.1You can get the setup_android.cmake script and run it via
cmake -P setup_android.cmake
.The script might be a bit outdated, have a look at the android/sdk_definitions.json and adjust the values.
Then point Qt Creator to the new directories.
-
@JustCharles said in TLS initialization failed: Downloading Android SDK Tools:
Second thing I had to do was downloading OpenJDK 11. My local copy is writable (the Ubuntu's global install is not).
Error message is wrong - JDK just not installed (you can try to check by typing
javac
), so solution is:sudo apt install openjdk-11-jdk-headless
-
-
I solved here using this method
First, click on the "world" icon in the right of setup sdk"
install the zip file for linux
Follow this tutorial here
After that , open your terminal and use this command, where the "sdkxdxd" is the name of your folder ( mine is sdkxdxd), it will start installing stuff with a fetch, click Y and it will finnish
Now you can go back to your QT, go to preferences->devices->android and search in the "Android SDK location" for the folder where you did all the stuff. Mine look like this
After i choose the folder, it started installing the rest of the stuff automatically ( a pop up will appear), if it doesnt, i reccomend following the documentation from Android
https://developer.android.com/tools/sdkmanager
Hope it works for everyone -
In Fedora Linux 38
-
sudo dnf install openssl1.1
-
Try to
Set Up SDK
again and it should work
-