[英]Why do i get this error when trying to build cordova app in Android studio
I have installed the latest build-tools;我已经安装了最新的构建工具; 29.0.2.
29.0.2。 Still it says no build-tools installed
仍然说没有安装构建工具
C:\Users\user\Downloads\android-studio-ide-\android-studio\bin\runnerw.exe C:\Users\user\AppData\Roaming\npm\cordova.cmd run android Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=C:\Users\user\AppData\Local\Android\Sdk (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app C:\Users\user\Downloads\android-studio-ide-\android-studio\bin\runnerw.exe C:\Users\user\AppData\Roaming\npm\cordova.cmd 运行 android 检查 Java JDK 和 Android SDK 版本ANDROID_SDK_ROOT=undefined (推荐设置) ANDROID_HOME=C:\Users\user\AppData\Local\Android\Sdk (DEPRECATED) 子项目路径:CordovaLib 子项目路径:app
Project evaluation failed including an error in afterEvaluate {}.项目评估失败,包括 afterEvaluate {} 中的错误。 Run with --stacktrace for details of the afterEvaluate {} error.
使用 --stacktrace 运行以获取 afterEvaluate {} 错误的详细信息。
FAILURE: Build failed with an exception.失败:构建失败,出现异常。
Where: Script 'C:\Users\user\LagBus\platforms\android\CordovaLib\cordova.gradle' line: 68其中:脚本 'C:\Users\user\LagBus\platforms\android\CordovaLib\cordova.gradle' 行:68
What went wrong:什么地方出了错:
Configure project:app A problem occurred evaluating project ':app'.
配置项目:app 评估项目“:app”时出现问题。 No installed build tools found.
未找到已安装的构建工具。 Install the Android build tools version 19.1.0 or higher.
安装 Android 构建工具版本 19.1.0 或更高版本。
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.
使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.
使用 --scan 运行以获得完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获得更多帮助
BUILD FAILED in 16s C:\Users\user\LagBus\platforms\android\gradlew: Command failed with exit code 1 Error output: Project evaluation failed including an error in afterEvaluate {}. BUILD FAILED in 16s C:\Users\user\LagBus\platforms\android\gradlew: Command failed with exit code 1 错误输出:项目评估失败,包括 afterEvaluate {} 中的错误。 Run with --stacktrace for details of the afterEvaluate {} error.
使用 --stacktrace 运行以获取 afterEvaluate {} 错误的详细信息。
FAILURE: Build failed with an exception.失败:构建失败,出现异常。
Where: Script 'C:\Users\user\LagBus\platforms\android\CordovaLib\cordova.gradle' line: 68其中:脚本 'C:\Users\user\LagBus\platforms\android\CordovaLib\cordova.gradle' 行:68
What went wrong: A problem occurred evaluating project ':app'.出了什么问题:评估项目“:app”时出现问题。
No installed build tools found.
未找到已安装的构建工具。 Install the Android build tools version 19.1.0 or higher.
安装 Android 构建工具版本 19.1.0 或更高版本。
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.
使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.
使用 --scan 运行以获得完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获得更多帮助
BUILD FAILED in 16s Picked up _JAVA_OPTIONS: -Xmx1024M 16 秒内构建失败 拾取 _JAVA_OPTIONS:-Xmx1024M
It might be that you don't have the android tools configured in your PATH, so cordova can't find them.可能是你没有在 PATH 中配置 android 工具,所以cordova找不到它们。
So, check that, in your path you have access to the android build tools and even other Android development environment configurations.因此,请检查您是否可以在您的路径中访问 android 构建工具甚至其他 Android 开发环境配置。
This is an example of a problem similar to yours, and how to solve it: According to this: https://github.com/ionic-team/ionic/issues/13120这是一个类似于你的问题的例子,以及如何解决它:根据这个: https ://github.com/ionic-team/ionic/issues/13120
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.