“Gradle sync failed:找不到已安装的构建工具。安装Android构建工具版本19.1.0或更高版本“ [英] "Gradle sync failed: No installed build tools found. Install the Android build tools version 19.1.0 or higher"

查看:1618
本文介绍了“Gradle sync failed:找不到已安装的构建工具。安装Android构建工具版本19.1.0或更高版本“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Android Studio中打开Ionic2项目,但它在事件日志中出现以下错误:
Gradle sync失败:找不到已安装的构建工具。安装Android版本工具版本19.1.0或更高版本。请参阅IDE日志以获取更多详细信息(帮助|显示日志)
SCREENSHOT

I'm trying to open an Ionic2 Project in Android Studio, but it gives me the following error into the Event Log: "Gradle sync failed: No installed build tools found. Install the Android build tools version 19.1.0 or higher. Consult IDE log for more details (Help | Show Log)" SCREENSHOT

我之前看过一个类似的问题(也许是最新版本之一) Ionic2或Cordova破坏了某些东西 - > https://github.com/driftyco/ionic/issues/10604 )。

I have seen a similiar problem stated before (also maybe one of the latest release of Ionic2 or Cordova broke something -> https://github.com/driftyco/ionic/issues/10604).

从gradle.build文件或Project Structure更改buildToolsVersion或compileSdkVersion的版本没有帮助。

Changing the version of "buildToolsVersion" or "compileSdkVersion" from gradle.build file or from Project Structure didn't help.

在C:\Users\Gaby \ AppData \ Local \ Android \\\ddk \ build-tools \24.0.3下,我安装了24.0.3构建工具版本。

Under "C:\Users\Gaby\AppData\Local\Android\sdk\build-tools\24.0.3", I installed the 24.0.3 build tool version.

环境变量中的路径变量也表明路径正确

The path variable from environment variables indicates also the path correctly

那一刻,我用android update sdk -u -a安装了所有构建工具,但同样的错误发生了。

At one moment, I had all build-tools installed with "android update sdk -u -a" but again, the same error occured.

有没有人知道这个问题的合适解决方法?

Does anybody know a suitable workaround to this issuse ?

非常感谢

推荐答案

您需要编写正确的环境变量。 https://spring.io/guides/gs/android/

You need to write the correct "Environment Variables". https://spring.io/guides/gs/android/

Windows:

set ANDROID_HOME=C:\\android-sdk-windows set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

Mac OS X

export ANDROID_HOME=/<installation location>/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Linux

export ANDROID_HOME=/<installation location>/android-sdk-linux
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

这篇关于“Gradle sync failed:找不到已安装的构建工具。安装Android构建工具版本19.1.0或更高版本“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆