[英]Ionic Cordova Android: No usable Android build tools found. Highest 30.x installed version is 30.0.2; minimum version required is 30.0.3
I have updated Cordova Android to the latest (10.1.1) and now when I build I get:我已将 Cordova Android 更新到最新(10.1.1),现在当我构建时,我得到:
No usable Android build tools found.
找不到可用的 Android 构建工具。 Highest 30.x installed version is 30.0.2;
最高 30.x 安装版本为 30.0.2; minimum version required is 30.0.3
所需的最低版本是 30.0.3
I have the following reported when I start the build:当我开始构建时,我报告了以下内容:
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\peter\AppData\Local\Android\sdk (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: C:\Users\peter\AppData\Local\Android\sdk
I also have the folder C:\Users\peter\.android
an C:\Users\peter\.gradle
我还有文件夹
C:\Users\peter\.android
和C:\Users\peter\.gradle
I upgraded Android Studio,dowloaded SDK's etc, and started a new project after reading elsewhere this may update the build tools.我升级了 Android Studio,下载了 SDK 等,并在阅读其他地方后开始了一个新项目,这可能会更新构建工具。 This did make a difference, as originally the error reported installed version was
29.0.2
and now it is 30.0.2, but something is looking for 30.0.3
.这确实产生了影响,因为最初报告的错误安装版本是
29.0.2
现在是 30.0.2,但正在寻找30.0.3
。
The version 30.0.3
is coming from the file platforms\android\cdv-gradle-config.json
, and I have the following folders in `C:\Users\peter\AppData\Local\Android\sdk\build-tools..版本
30.0.3
来自文件platforms\android\cdv-gradle-config.json
,我在 `C:\Users\peter\AppData\Local\Android\sdk\build-tools. 中有以下文件夹。
I cannot see how to get 30.0.3
, when I look at https://developer.android.com/studio/releases/build-tools#groovy I don't see this version我看不到如何获得
30.0.3
,当我查看https://developer.android.com/studio/releases/build-tools#groovy我没有看到这个版本
Why might this config have this version, or where I can get this version of the build tools?为什么这个配置可能有这个版本,或者我可以从哪里获得这个版本的构建工具?
Today, I could finally install version 30.0.3.今天,我终于可以安装 30.0.3 版本了。
In Android Studio, I could see and install it from here...在 Android Studio 中,我可以从这里查看并安装它...
After this, and then also having to remove the whitelist plugin (it is not required any more), I could get it to build.在此之后,然后还必须删除白名单插件(不再需要它),我可以构建它。
Only hassle now is it outs to a .aab
and not an .apk
so side load testing now harder.现在唯一的麻烦是
.aab
而不是.apk
所以侧面负载测试现在更难了。 But the main issue, the building is now working (on Windows PC).. Now hopefully can do the same on the Mac.但主要问题是,建筑物现在正在运行(在 Windows PC 上)。现在希望可以在 Mac 上做同样的事情。
it is due to the android platform version.run the code 'ionic info'to find the version.if it is 10.1.1,remove it by running the code 'ionic cordova platform rm android' and install the version 8.0.0 by the code'cordova platform add android@8.0.0'.And run the build code这是由于 android 平台版本。运行代码“离子信息”找到版本。如果是 10.1.1,通过运行代码“离子 cordova 平台 rm android”将其删除并安装版本 8.0.0代码'cordova platform add android@8.0.0'.并运行构建代码
Possibly of use to people reading this--可能对阅读本文的人有用——
This is answered in this GitHub issue .这在GitHub 问题中得到了解答。 In short, major version upgrades of the build tools are likely to break Cordova, so the latest Cordova only supports build tools version 30.0.3.
总之,构建工具的大版本升级很可能会破坏Cordova,所以最新的Cordova只支持构建工具版本30.0.3。 The error message asking for "30.0.3 or higher" is misleading, and was an oversight and will be changed.
要求“30.0.3 或更高版本”的错误消息具有误导性,是疏忽,将被更改。 Currently, 30.0.3 is the only version that works here and that Android Studio will install from the "SDK Tools" tab.
目前,30.0.3 是此处唯一可用的版本,Android Studio 将从“SDK 工具”选项卡安装。
Solution: Install version 30.0.3, and it should work (it works for me).解决方案:安装版本 30.0.3,它应该可以工作(对我有用)。
https://dl.google.com/android/repository/repository2-1.xml https://dl.google.com/android/repository/repository2-1.xml
base: http://dl-ssl.google.com/android/repository/基地: http://dl-ssl.google.com/android/repository/
30.0.3url:91936d4ee3ccc839f0addd53c9ebf087b1e39251.build-tools_r30.0.3-windows.zip 30.0.3url:91936d4ee3ccc839f0addd53c9ebf087b1e39251.build-tools_r30.0.3-windows.zip
so: http://dl-ssl.google.com/android/repository/91936d4ee3ccc839f0addd53c9ebf087b1e39251.build-tools_r30.0.3-windows.zip所以: http://dl-ssl.google.com/android/repository/91936d4ee3ccc839f0addd53c9ebf087b1e39251.build-tools_r30.0.3-windows.ZADCDBD79A8D84172F229B192AADC
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.