简体   繁体   English

离子 Cordova Android:找不到可用的 Android 构建工具。 最高 30.x 安装版本为 30.0.2; 所需的最低版本是 30.0.3

[英]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\.androidC:\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,它应该可以工作(对我有用)。

暂无
暂无

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

相关问题 离子构建时间错误“未找到已安装的构建工具。安装 Android 构建工具版本 30.0.3 或更高版本” - Ionic build time error "No installed build tools found. Install the Android build tools version 30.0.3 or higher" ionic cordova bulid android:未找到已安装的构建工具。 安装 Android 构建工具版本 19.1.0 或更高版本 - ionic cordova bulid android : No installed build tools found. Install the Android build tools version 19.1.0 or higher Ionic Aangular:未找到已安装的构建工具。 安装 Android 构建工具版本 19.1.0 或更高版本 - Ionic Aangular :No installed build tools found. Install the Android build tools version 19.1.0 or higher Cordova运行错误-找不到安装的生成工具。 安装Android构建工具版本19.1.0或更高版本 - Cordova run error - No installed build tools found. Install the Android build tools version 19.1.0 or higher 已安装 Ionic 构建工具但收到错误“未找到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本。” - Ionic build tools installed but receiving error "No installed build tools found. Install the Android build tools version 19.1.0 or higher." 在 Visual Studio 中使用 ionic + Cordova 我不断收到“找不到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本。” - Using ionic + Cordova in visual studio i keep getting "No installed build tools found. Install the Android build tools version 19.1.0 or higher." “Gradle 同步失败:未找到已安装的构建工具。安装 Android 构建工具版本 19.1.0 或更高版本” - "Gradle sync failed: No installed build tools found. Install the Android build tools version 19.1.0 or higher" 未找到已安装的构建工具。 安装 Android 构建工具版本 30.0 - No installed build tools found. Install the Android build tools version 30.0 Ionic Cordova Build Android 未找到已安装的构建工具 - Ionic Cordova Build Android No installed build tools found 离子构建 Android | 错误:找不到已安装的构建工具。 请安装Android构建工具 - ionic build Android | error: No installed build tools found. Please install the Android build tools
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM