Home » Android » gradle – How to change build tools version in Android Studio

gradle – How to change build tools version in Android Studio

Posted by: admin June 15, 2020 Leave a comment

Questions:

I have a problem using jfeinstein10 Sliding Menu

I added the library into my root project folder. But I get this error :

Error:The SDK Build Tools revision (17.0.0) is too low for project
‘:SlidingMenu’. Minimum required is 19.1.0

But I’m already using “19.1.0” but it still says I’m using 17.0.0

Here is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "19.1.0"

    defaultConfig {
        applicationId "com.repliklernet.replikler"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile group:'com.squareup.picasso', name:'picasso', version:'2.5.0'
    compile project(':SlidingMenu')
}

What am I missing ?

How to&Answers:

If you look at the build.gradle file for the library, you can see that it references build tools 17: https://github.com/jfeinstein10/SlidingMenu/blob/master/library/build.gradle#L17

You need to update that line.

The error is actually giving you a hint by mentioning project ':SlidingMenu', referring to the project SlidingMenu.

Answer:

Right click on the project folder and choose ‘Open Module Setings’
Select ‘app’ on the Modules List(Left pane)
Select ‘Properties’ tab and will present you with ‘Compile SDK Version’, ‘Build Tools Version’.

Click OK

Reference : https://www.youtube.com/watch?v=v4b7C6Q-9dI

Answer:

You should change the build.gradle within your library