简体   繁体   中英

How to install additional Android SDK into Delphi 10.X or Delphi 11.X?

Delphi comes with pre-installated Android SDKs that are installed during the installation time of the Delphi Development Studio. Eg Delphi 10.2 (AKA 19.0) comes with Android SDK 24.3.3 with paths ( Tools - Options - Environment Options - SDK Manager ):

SDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.29039.2004
NDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidNDK-9c_19.0.29039.2004

And Delphi 10.4 (AKA 21.0) comes with Android SDK 25.2.5 with paths:

SDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.38860.1461
NDK base path:
C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.38860.1461\android-ndk-r21

My question is - what should I do to install Android SDK 24.3.3. in Delphi 10.4. This may be no the best thing to do, this may be even the incompatible thing to do, but, however, this is very good example of the situation when one SDK is shared by several Delphi versions.

https://www.embarcadero.com/starthere/xe5/mobdevsetup/android/en/adding_an_android_sdk.html (and partially https://www.embarcadero.com/starthere/seattle/mobdevsetup/android/en/adding_an_android_sdk.html ) suggests that I can download the Android-provided SDK, unzip it in some custom directory and simply add those paths in the new-SDK fields for the paths.

But I am confused - where to get eg Android SDK 24.3.3? There are many 3rd party sites which may be unreliable. And will such simple installation work? Eg I provided the examples of installation-time-installed SDKs and all of the contains the additional directories that depend on the verions of the Delphi - eg Android SDK 24.3.3 for Delphi 10.2 (19.0) has directories with the number 19 and Android SDK 25.2.5 for Delphi 10.3 (21.0) has directories with the number 21. So - Delphi may take some additional steps during installation and create those directories?

Or maybe Delphi is very conservative regarding the SDKs that can be used for the particular version of Delphi? It may be so, but it overexcessively limits the versions of devices that can be supported by the apps developer with particular version of Delphi. This paragraph (note) is not the additional question, it just makes suggestion that my main question can be irrelevant wrt how Delphi versining has been inteded?

You can install additional SDK's using SDK Manager tool of Android Studio. SDK Manager install Android SDK's by default to C:\Users<WindowsUser>\AppData\Local\Android\Sdk.

After installing Android SDK, should define it to Delphi IDE by using Tools -> Options form.
In Options form under Deployment - SDK Manager section, you can add new SDK for Android 64 or Android 32 platforms. During addition of new SDK, you should enter Android SDK install location of Adroid Studio for Android SDK base path. Again it is by default, C:\Users<WindowsUser>\AppData\Local\Android\Sdk.

For Android NDK base path, you have two options. Option 1 is to use the NDK folder path of Delphi NDK installation. For Delphi 11.2, it is C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.46141.0937\android-ndk-r21. Option 2 is to download another NDK from https://developer.android.com/ndk/downloads , extract the NDK to a folder and use this folder as NDK base path. You should be careful, since not all new versions of NDKs are supported by Delphi.

After adding new SDK to Delphi IDE, It is listed in SDK Versions list as "Android 32-bit" or "Android 64-bit". For example, it is listed as Android 33.0.3 64-bit.

In addition, you can upgrade Android SDK which Delphi installed. To upgrade your installation, the procedure given in the following link must be applied. https://blogs.embarcadero.com/developing-for-android-11-12-with-delphi-11-alexandria/#updating-your-android-tools

as far as I know, you need to download new SDKs with SDK manager. Search for it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM