问题描述
我在 Android Studio 0.5.9 中有一个 Android 项目,Gradle 抛出此错误:
I have an Android Project in Android Studio 0.5.9 and Gradle is throwing this error:
Error:The SDK Build Tools revision (17.0.0) is too low. Minimum required is 19.0.0
我已经从 SDK Manager 安装了 SDK Build Tools Revision 19,这是我的 build.gradle
I have already installed SDK Build Tools Revision 19 from the SDK Manager and here is my build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 17
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'Manantiales/src/main/AndroidManifest.xml'
}
}
}
如果已经安装了 Build Tools 19,我该如何告诉 gradle 使用它?
How do I tell gradle to use the Build Tools 19 if it's already installed?
我将一个不同的答案标记为最佳答案,因为它适用于大多数人
I marked a different answer as The Best Answer because it was the one that worked for most people
推荐答案
我今天早上更新到 .6.0 后遇到了同样的问题.您需要在/projectName/build.gradle
I had the same problem this morning after updating to .6.0. You need to change you gradle version in /projectName/build.gradle
classpath 'com.android.tools.build:gradle:0.11.+'
打开您的 SDK 管理器并下载新版本的构建工具 19.1 然后在/projectName/moduleName/build.gradle 中更改以下行
Open your SDK manager and download the new version of the build tools 19.1 then change the following line in /projectName/moduleName/build.gradle
android {
compileSdkVersion 19
buildToolsVersion "19.1" //This version needs to be updated to 19.1 after SDK update
...
}
然后同步你的 gradle 文件,你就可以开始了!
Then sync your gradle files and you should be good to go!
这篇关于Android Studio Gradle BuildTools 修订版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!