cordova - 在 Ionic3 中获取“未找到已安装的构建工具”
问题描述
我收到此错误,不知道如何解决。
D:\Ionic\payment>ionic cordova build android
Running app-scripts build: --platform android --target cordova
[13:11:22] build dev started ...
[13:11:22] clean started ...
[13:11:22] clean finished in 31 ms
[13:11:22] copy started ...
[13:11:23] deeplinks started ...
[13:11:23] deeplinks finished in 78 ms
[13:11:23] transpile started ...
[13:11:37] transpile finished in 13.83 s
[13:11:37] preprocess started ...
[13:11:37] preprocess finished in less than 1 ms
[13:11:37] webpack started ...
[13:11:37] copy finished in 15.46 s
[13:11:50] webpack finished in 12.61 s
[13:11:50] sass started ...
[13:11:54] sass finished in 3.79 s
[13:11:54] postprocess started ...
[13:11:54] postprocess finished in 31 ms
[13:11:54] lint started ...
[13:11:54] build dev finished in 31.82 s
> cordova build android
Android Studio project detected
ANDROID_HOME=D:\Android SDK\Android\Sdk\platform-tools
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_151
studio
Subproject Path: CordovaLib
Subproject Path: app
[13:12:07] lint finished in 13.28 s
**FAILURE: Build failed with an exception.
* Where:
Script 'D:\Ionic\payment\platforms\android\CordovaLib\cordova.gradle' line: 68
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 11s
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Script 'D:\Ionic\payment\platforms\android\CordovaLib\cordova.gradle' line: 68
* What went wrong:enter code here
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 23.0.1 or higher.
* Try:
Run with --stacktrace o ption to get the stack traenter code herece. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 11s
[ERROR] An error occurred while running cordova build android (exit code 1).**
解决方案
请检查您是否安装了 Android Studio 并且 ANDROID_HOME 设置为适当的路径
推荐阅读
- r - 如何在 Shiny 中不使用单选按钮链接复选框输入?
- javascript - 如何在 React 中使用 useState 检查复选框的更改值
- windows - 从 unix 导出到 powershell 的替代方法是什么,Set 仅适用于 CMD。我需要它用于powershell
- angular - 如何在Angular列中实现切换复选框
- php - 当句子有重音符号时PHP显示完整的空白文本
- c++ - 在编译时为稀疏数组索引自动生成 switch 语句
- python - 如何从 csv 文件中找到最大年龄,然后返回该人的姓名?
- ssl - 如何使用带有 nginx-ingress 的数字证书来启用 https
- python - 无法导入我刚刚安装的 Python 模块
- ruby - 将用户输入添加到哈希中