Jump to content
scamp

Delphi 12.0 Athens is not correctly installing the Android SDK

Recommended Posts

I have installed D12 using the offline installer (ISO). 

The installer claimed to have installed Android NDK and SDK.

Under Tools / Options / Deployment / SDK Manager the paths for NDK & Java are marked as correct. But for the SDK all paths with the exception of "avdmanager.bat or android.bat location:" have an exclamation mark.

And indeed, C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.50491.5718 only contains the cmdline-tools subdirectory, and a couple of files (GetItInstall.dat, png, Eula, commandlinetools-win-9477386.zip).

On D11 the SDK directory is 1.4GB in size, and contains subdirectories "build-tools", "emulator", "platforms" etc etc.

So clearly the Delphi installer is not correctly/fully installing it.

Removing and re-adding it with "Manage Features..." results in the exact same result. No errors reported, but SDK is not fully installed.

Any pointers?

Share this post


Link to post
3 minutes ago, scamp said:

So clearly the Delphi installer is not correctly/fully installing it.

It's likely because you have an incompatible JDK present on the machine. This is a potential fix:

 

1. Make sure JAVA_HOME environment variable is set to the Adoptium JDK:

JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.15.10-hotspot

2. Add missing build-tools by going to:

C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.50491.5718\cmdline-tools\latest\bin

In a command prompt and issue these commands:

sdkmanager “build-tools;33.0.2”
sdkmanager “platforms;android-33”

 

  • Like 5

Share this post


Link to post

Hey Dave,

thanks much. I first had to get that Eclipse Adoptium installer. Confused on why the Delphi installer is not installing any JDK when it's needing it...

Using the two sdkmanager commands works, and a couple of exclamation marks are gone, but the SDK Manager still is complaining about "SDK base path", "adb.exe location". Do you know what else to install?

(Trying to add the Android platform to a project and building it produces the amazingly helpful compiler output "[Error]", so the compiler clearly isn't happy yet, either)

Share this post


Link to post
On 11/9/2023 at 10:52 PM, scamp said:

Do you know what else to install?

Had same issue..

sdkmanager "platform-tools" "platforms;android-33"

this command will install the platform-tools which are also missing..

sdkmanager

pretty sure my issue was due to an older version of java during install, sdkmanager fails to run..

make sure java paths are set for both 32 and 64 bits, i forgot one..

 

no more compile errors anyways..

 

thanks!

~q

  • Like 1

Share this post


Link to post

I cannot make this work.

The entire directory AndroidSDK-2525-23.0.50371.5667\ does not exist.

I then downloaded the 'build-tools' from the android website, created this directory and copied the build-tools into it.

The PATH to the C:\Program Files\Eclipse Adoptium\ exists (and it is installed)

 

When I run the command line, I get this error:

Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: <sdk>\cmdline-tools\latest\

 

When I then try to add the --sdk_root I get the error:

Error: Unknown argument "--sdk_root C:\.....

 

What a mess.

What must I do to make it work?

 

Edited by Bart Kindt
To get notified

Share this post


Link to post
2 minutes ago, Bart Kindt said:

The entire directory AndroidSDK-2525-23.0.50371.5667\ does not exist.

In the released version of Delphi 12, the folder is: 

C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.50491.5718

 

Share this post


Link to post

To be clear: there was NO NDK directory at all after installation.


Note I had the Beta version initially installed, but I have not tested the Android side of it then.

Now I need to work on my Android App, I only found that while the SDK directories are set up in the Deployment, they where never created and nothing at all was downloaded.

 

Edited by Bart Kindt
Type

Share this post


Link to post

I am now completely uninstalling the whole system.

...

I have now re-installed. And now I have lost everything!  The Options>Deployment>SDK manager is now completely empty!

I did see a flash of a CMD window with something like 'file not found' but was gone to quick.

 

What must I now do to completely delete the entire installation (icluding all registry) and how am I supposed to get Delphi 12 installed properly??

 

Edited by Bart Kindt

Share this post


Link to post

Final solution:

First I uninstalled via Windows. But this did not do the request to clear all registery data, so new installation was worse than the original situation.

 

But when I run the (ISO) installation direct, I could tell the installer to clear everything during un-install.

When the system was re-installing I could tell it to install the SDK and related stuff.

 

Now everything finally seems complete.

 

  • Like 1

Share this post


Link to post

Hello,

 

I have exactly the same problem here after Delphi 12 installation.

This directory has been created :

C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.50491.5718

But a lot of files are missing in this directory (platforms, build-tools and platforms-tools subdirectories for example).

Maybe because of an existing Delphi 11.3 + Android SDK (AndroidSDK-2525-22.0.47991.2819) always installed ?

 

 

Edited by FabDev

Share this post


Link to post

Hello,

after being stuck on Delphi XE5 for many years I am finally trying to catch up and get the latest. The main goal/motivation is to develop for Android. I tried D11 but installation was crashing because of bad-gateway on "getit" server.  So, I registered for D12 Trial and successfully installed but I could not find much of Android platform available (more details below). Perhaps the root of my problems is that I was using Windows 7 SP1. Before I move on to Windows 11, I'd like to ask here if D12 can be installed (with Android dev platform) on Windows 7 machine ? If yes, then 2nd part of my story is below.

 

My installation of D12 (from iso file) completed okay but I found no Android platform available as a target. So I googled, found this thread and uninstalled D12. Next I made sure to have "Eclipse Adoptium" java, JAVA_HOME environment and JAVA_HOME\bin in my system "path". Launched installation of D12 again. Everything seemed to be fine but Android SDK/NDK were non-existent when installation completed. In C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\ I have the following folders: Windows_and_Android_Common_Files-23.0.50491.5718, Delphi_Android_Enterprise_Trial-23.0.50491.5718 and Android_Common_Files_Enterprise_Trial-23.0.50491.5718 but they are nearly-empty. When I open Tools-> Options->Deployment->SDK Manager everything is empty. Same as first time. In the next step I tried to add Android SDK/NDK manually, by following this and this. I used SDK 32 and NDK r26b and advanced well forward. In the end however, the "Create a new Android SDK" window in D12 reported that it cannot find paths/locations of ld.exe, strip.exe and gdbserver. I searched the SDK and NDK folders and only found ld.exe but no strip.exe and gdbserver.  No I wonder what's the next step.  Any hint will be greatly appreciated - thanks !

 

Share this post


Link to post
6 hours ago, mark.m said:

I'd like to ask here if D12 can be installed (with Android dev platform) on Windows 7 machine ? If yes, then 2nd part of my story is below.

 

Since a long time Windows 10 is reuqired to install the Delphi IDE. You can compile applications for older versions of Windows but the dev. machine should be at least Windows 10.  I am not aware if there a possibility to install it on Windows 7.

Share this post


Link to post

Thanks a lot Lajos - I will proceed with installation on Windows 10 and see if the result is better. 

 

Share this post


Link to post

I did a fresh installation of D12 Architect on a solid Windows 10 box with all updates, Adoptium JDK, JAVA_HOME, java/bin in system paths and everything else I could imagine as potentially important. 

The installation went perfectly fine.

The final result was identical to what I experienced on Windows 7. Android SDK and other Android components were missing.

In particular, the folders AndroidSDK-2525 and AndroidNDK-21 are nowhere to be found. 


I wonder what is the next move that can help in getting Android development ?

 

 

Share this post


Link to post
2 minutes ago, mark.m said:

JAVA_HOME, java/bin in system paths

What does JAVA_HOME show as, and do you have C:\Program Files\Eclipse Adoptium\jdk-11.0.14.101-hotspot\bin (or a variation thereof, depending on the hotspot version) in the PATH variable? Do you have anything else in the PATH that points to some other JDK?

Share this post


Link to post

The JAVA_HOME points to C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot

System variable "PATH" has C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin

There is no other Java/JDK instance specified in PATH or otherwise.

 

Share this post


Link to post

Hello,

 

I have same issue: when installing Delphi 12 with Eclipse Adoptium and Android SDK options checked, I have missing files for deploying an Android application.

 

Then I tried to download missing files with these commands in prompt but it doesn't work, I have errors:

cmdline-tools\latest\bin\sdkmanager.bat --update
cmdline-tools\latest\bin\sdkmanager.bat --install "platforms;android-33"
cmdline-tools\latest\bin\sdkmanager.bat --install "build-tools;33.0.0"

 

Like mark.m, I have these following settings:

On 2/8/2024 at 6:34 AM, mark.m said:

The JAVA_HOME points to C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot

System variable "PATH" has C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin

There is no other Java/JDK instance specified in PATH or otherwise

 

At that point I really don't know how to figure it out and resolve my issue. That's why I also installed Android Studio hoping I could download SDK and NDK with SDK Manager tool. I tought it has resolve my issue because downloaded directories are accepted by Delphi (ie directories are fully complete) but in the configuration page, there are stil warnings:

 

1618725095_Capturedcran2024-03-19165535.thumb.png.a118b1988e2ea13ae8f5962f7b7a2806.png

 

Regards

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×