Android Studio Gradle BuildTools Revision

2019-01-16 16:04发布

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

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'
        }
    }
}

How do I tell gradle to use the Build Tools 19 if it's already installed?

EDIT: I marked a different answer as The Best Answer because it was the one that worked for most people

11条回答
戒情不戒烟
2楼-- · 2019-01-16 16:08

change in build.gradle "project: layout xml " code >>

 buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'


}

}allprojects { repositories { jcenter() enter code here } }

查看更多
迷人小祖宗
3楼-- · 2019-01-16 16:09

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.+'

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

  ...

}

Then sync your gradle files and you should be good to go!

查看更多
迷人小祖宗
4楼-- · 2019-01-16 16:17

I didn't realize that my errors changed when I changed buildToolsVersion "19.0.0" to buildToolsVersion "19.1.0" in my build.gradle.

The first error was:

Error: The SDK Build Tools revision (19.0.0) is too low for project 'android'. Minimum required is 19.1.0

The second error was a little bit different, but I didn't see it:

Error: The SDK Build Tools revision (19.0.0) is too low for project ':CordovaLib'. Minimum required is 19.1.0

So I've also changed the build.gradle inside the CordovaLib folder, and the error disappeared.

查看更多
The star\"
5楼-- · 2019-01-16 16:17

Hi for me after download the last version of the android SDK Tools, I change the android version F4 (Module Settings)

https://www.dropbox.com/s/9ypuepxfwlcp4e5/Captura%20de%20pantalla%202014-06-10%2000.45.38.png

查看更多
forever°为你锁心
6楼-- · 2019-01-16 16:17

I too faced the same problem and the fix was so simple. Just launch android SDK manager and check the latest build tools. Finally click on install packages which were selected. Now restart the IDE and try building the project.

查看更多
乱世女痞
7楼-- · 2019-01-16 16:18

I found the problem, build.gradle was on the wrong folder

查看更多
登录 后发表回答