Android SDK Tools missing or fail to install during setup of RAD Studio
In some instances the installation of the required Android SDK tools (adb, platform files, api level etc) fail during the initial setup of the Android target in RAD Studio. Most commonly, the wrong JDK in available in JAVA_HOME environment variable or not installed at all.
The nature of how these external installation tools are invoked, do not provide feedback to the main RAD Studio setup and will thus fail silently, this will result in the IDE is unable to perform the build/deployment step when targeting Android.
For RAD Studio 12.1 and 12.2, JDK v17 is required.
You can use ninite.com to quickly select and install Adoptium JDK 17 x64, prior to running the RAD Studio setup.
To check if the correct JDK version is available in JAVA_HOME, open a command prompt and execute java --version if it returns a Java Runtime JDK version of 17.x or newer, you may proceed.
Another, but less common case, your enterprise environment (That is, your IT department) employs strong network security, including Deep Packet Inspection.
In short, the vendor of such a solution, pushes their own SSL certificate to clients, this allows them to intercept, decrypt and inspect https traffic - now, this causes problems for services which employs certificate pinning and verification of the certificate, something sdkmanager.bat does.
sdkmanager.bat is the command line utility google provides as part of their Android SDK package to install various api levels and other supporting tools used in the Android software development process.
To manually install the required Android tools and circumvent the SSL certificate issue, follow the steps below.
For RAD Studio 12.1 and 12.2
Now the required packages from the Android SDK is installed, you can now proceed to open RAD Studio.
Go to Tools -> Options -> Deployment -> SDK Manager and verify the 32 and 64 Android SDKs do not have any exclamation marks next to the path selectors.
It is especially important to check the Java tab, and make sure keytool and jarsigner have fully qualified paths pointing to the currently installed Adoptium JDK 17.
Adjust accordingly and check the page both for 32 and 64 bit Android SDK!