Cordova Android构建失败(“未能找到构建工具修订24.0.1”)

Cordova Android Build Failure ("failed to find Build Tools revision 24.0.1")

本文关键字:构建 工具 失败 Android Cordova      更新时间:2023-09-26

我在用Android构建我的Cordova项目时遇到了麻烦。当我输入"cordova build Android"时,结果如下:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> failed to find Build Tools revision 24.0.1

我检查了我的SDK管理器和构建工具版本24.0.1已经安装。我之前建的还好,所以我不确定是什么改变了。任何帮助都会很感激。谢谢!

我首先要确保你的PATH环境/系统变量包含各种Android工具的路径,并且你有一个ANDROID_HOME条目指向SDK

部分路径示例(在Windows上):

C:'Program Files (x86)'Android'android-sdk'tools;
C:'Program Files (x86)'Android'android-sdk'platform-tools;

ANDROID_HOME示例(Windows):

C:'Program Files (x86)'Android'android-sdk