在嘗試構建Android平臺的離子應用程序時,我得到了下面的錯誤來安裝Android構建工具,但我在我的PATH變量和ANDROID_HOME中配置了sdkmanager。請幫助我。離子cordova構建android - 失敗
系統變量:
%ANDROID_HOME%= K:/ Android的SDK %PATH%=%APTH%/%ANDROID_HOME%/工具/ bin中
的%ANDROID_HOME%/工具輸出/斌/ sdkmanager --list
Available Updates:
ID | Installed | Available
------- | ------- | -------
tools | 26.0.1 | 26.1.1
done
錯誤:
[21:12:35] lint finished in 4.37 s
× Running command - failed!
[ERROR] An error occurred while running cordova build android (exit code 1):
(truncated) ... eLauncher$1.execute(DefaultGradleLauncher.java:161)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:158)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
FAILURE: Build failed with an exception.
* Where:
Script 'K:\mobileApp\platforms\android\CordovaLib\cordova.gradle' line:
64
* What went wrong:
A problem occurred evaluating root project 'android'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
我想你的情況沒有找到gradle path。看看這個鏈接,看看它是否有幫助 - https://stackoverflow.com/questions/43356833/cordova-android-requirements-failed-could-not-find-an-installed-version-of-gra/44592751#44592751 – Gandhi
@甘地我在我的系統變量中配置了gradle以及 –
可能你需要安裝android build tool 19.1.0或以上版本? – Gandhi