简体   繁体   English

如何在 Delphi 10.X 或 Delphi 11.X 中安装额外的 Android SDK?

[英]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. Delphi 带有预安装的 Android SDK,这些 SDK 在安装 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 ):例如,Delphi 10.2 (AKA 19.0) 附带带有路径的 Android SDK 24.3.3( 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: Delphi 10.4(AKA 21.0)随附 Android SDK 25.2.5,路径如下:

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.我的问题是 - 我应该怎么做才能安装 Android SDK 24.3.3。 in Delphi 10.4.在德尔福 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.这可能不是最好的做法,甚至可能是不兼容的做法,但是,这是一个 SDK 由多个 Delphi 版本共享的很好的例子。

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. https://www.embarcadero.com/starthere/xe5/mobdevsetup/android/en/adding_an_android_sdk.html (和部分https://www.embarcadero.com/starthere/seattle/mobdevsetup/android/en/adding_an_android_sdk.html )建议我可以下载 Android 提供的 SDK,将其解压缩到某个自定义目录中,然后将这些路径简单地添加到新 SDK 字段中作为路径。

But I am confused - where to get eg Android SDK 24.3.3?但我很困惑 - 从哪里获得 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?例如,我提供了安装时安装的 SDK 的示例,所有这些都包含依赖于 Delphi 版本的附加目录——例如,Delphi 10.2 (19.0) 的 Android SDK 24.3.3 具有编号为 19 和 Android SDK 的目录Delphi 10.3 (21.0) 的 25.2.5 具有编号为 21 的目录。因此 - Delphi 可能会在安装过程中采取一些额外的步骤并创建这些目录?

Or maybe Delphi is very conservative regarding the SDKs that can be used for the particular version of Delphi?或者也许 Delphi 对于可用于特定版本的 Delphi 的 SDK 非常保守? 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.可能是这样,但它过度限制了应用程序开发人员可以使用特定版本的 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?这一段(注释)不是附加问题,它只是暗示我的主要问题可能与 Delphi versining 的集成方式无关?

You can install additional SDK's using SDK Manager tool of Android Studio.您可以使用 Android Studio 的 SDK 管理器工具安装其他 SDK。 SDK Manager install Android SDK's by default to C:\Users<WindowsUser>\AppData\Local\Android\Sdk. SDK 管理器默认将 Android SDK 安装到 C:\Users<WindowsUser>\AppData\Local\Android\Sdk。

After installing Android SDK, should define it to Delphi IDE by using Tools -> Options form.安装Android SDK 后,应使用Tools -> Options 形式将其定义到Delphi IDE。
In Options form under Deployment - SDK Manager section, you can add new SDK for Android 64 or Android 32 platforms.在部署 - SDK 管理器部分下的选项表单中,您可以为 Android 64 或 Android 32 平台添加新的 SDK。 During addition of new SDK, you should enter Android SDK install location of Adroid Studio for Android SDK base path.添加新SDK时,Android SDK基本路径需要输入Adroid Studio的Android SDK安装位置。 Again it is by default, C:\Users<WindowsUser>\AppData\Local\Android\Sdk.同样,默认情况下,C:\Users<WindowsUser>\AppData\Local\Android\Sdk。

For Android NDK base path, you have two options.对于 Android NDK 基本路径,您有两个选择。 Option 1 is to use the NDK folder path of Delphi NDK installation.选项1是使用Delphi NDK安装的NDK文件夹路径。 For Delphi 11.2, it is C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.46141.0937\android-ndk-r21.对于 Delphi 11.2,它是 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.选项 2 是从https://developer.android.com/ndk/downloads下载另一个 NDK,将 NDK 解压到一个文件夹并将此文件夹用作 NDK 基本路径。 You should be careful, since not all new versions of NDKs are supported by Delphi.您应该小心,因为并非所有新版本的 NDK 都受 Delphi 支持。

After adding new SDK to Delphi IDE, It is listed in SDK Versions list as "Android 32-bit" or "Android 64-bit".将新的 SDK 添加到 Delphi IDE 后,它在 SDK 版本列表中列为“Android 32 位”或“Android 64 位”。 For example, it is listed as Android 33.0.3 64-bit.例如,它被列为 Android 33.0.3 64 位。

In addition, you can upgrade Android SDK which Delphi installed.此外,您还可以升级Delphi 安装的Android SDK。 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 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.据我所知,您需要使用 SDK 管理器下载新的 SDK。 Search for it.搜索它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Delphi 10.3.3, Android App AutoStart on Boot (Android 8.x, 10.x) - Delphi 10.3.3 , Android App AutoStart on Boot ( Android 8.x , 10.x ) 对将第 3 方 android aar 库导入 Delphi 10.x 项目有疑问 - Have a question about importing 3rd party android aar library into Delphi 10.x project 在One Plus X上使用Delphi进行Android开发:如何? - Android developement with Delphi on One Plus X: how to? 当 ionic cordova 在 Mac 10.x 上构建 android 时,gradle 失败 - gradle fails when ionic cordova build android on Mac 10.x Cordova(版本 10.x)- Ajax POST 方法不适用于 Android 平台 - Cordova (version 10.x) - Ajax POST method not working for Android platform 有没有人成功地将您的 ionic cordova Hybrid 应用程序从 android 9.x 版升级到 android Cordova 10.x 版 - Has anybody successfully upgraded your ionic cordova Hybrid app from android version 9.x to android Cordova version 10.x 如何在Mac OS X的Eclipse中安装Android JDK,SDK 4.0? - How to install Android jdk, sdk 4.0 in eclipse for Mac OS X? 在Android的Delphi 10中终止线程 - Terminating a thread in Delphi 10 with Android 在 Mac OS X 上安装 Android SDK 的位置? - Where to install Android SDK on Mac OS X? 如何在Android版Delphi 10中使用Maps.TMapCircle? - How to use Maps.TMapCircle in Delphi 10 for Android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM