简体   繁体   English

未检测到 Android 构建工具

[英]Android build tools not detected

I am developing Android application using Ionic framework (Ionic is built on top of Apache Cordova).我正在使用 Ionic 框架开发 Android 应用程序(Ionic 构建在 Apache Cordova 之上)。 When I try to build my app, I get an error, which states that build tools are missing.当我尝试构建我的应用程序时,我收到一个错误,指出缺少构建工具。

Error:错误:

> No installed build tools found. Install the Android build tools version 19.1.0 or higher.

I am using windows, and I have Android SDK tools installed (at C:\\tools), also I have used sdkmanager to install platform-tools (at C:\\platform-tools) and android26 and android27 platforms (at C:\\platforms\\android-26 and C:\\platforms\\android-27).我正在使用 Windows,并且安装了 Android SDK 工具(位于 C:\\tools),我还使用 sdkmanager 安装了平台工具(位于 C:\\platform-tools)以及 android26 和 android27 平台(位于 C:\\platforms \\android-26 和 C:\\platforms\\android-27)。

My ANDROID_HOME enviroment variable is set to C:\\tools and I have included all of the following locations in my path:我的 ANDROID_HOME 环境变量设置为 C:\\tools 并且我在我的路径中包含了以下所有位置:

  • C:\\tools C:\\工具
  • C:\\tools\\bin C:\\工具\\bin
  • C:\\platform-tools C:\\平台工具
  • C:\\platforms C:\\平台

I believe I am missing something, what do I have to do/fix for my build to succeedd.我相信我遗漏了一些东西,我必须做什么/修复才能使我的构建成功。 What are those build tools that I do not have installed?我没有安装的那些构建工具是什么?

You have set "ANDROID_HOME" to your sdk tools folder.您已将“ANDROID_HOME”设置为您的 sdk 工具文件夹。 This is causing an error in the relative navigation used by Cordova.这会导致 Cordova 使用的相对导航出错。

Solution: Create a new folder "SDK" in your C drive as such C:\\SDK .解决方案:在您的 C 驱动器中创建一个新文件夹“SDK”,例如C:\\SDK Now add all of the sdk stuff into that directory.现在将所有 sdk 内容添加到该目录中。 Finally, change your "ANDROID_HOME" path to C:\\SDK最后,将“ANDROID_HOME”路径更改为C:\\SDK

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

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