Shyamnath Mallinathan
Shyamnath Mallinathan

Reputation: 736

Error:The SDK Build Tools revision (23.0.3) is too low for project ':app'. Minimum required is 25.0.0

The title is a duplicate but my question is different.

The same project works fine and is allowed to be built on

buildToolsVersion 23.0.3

on my colleague's system. As far as I know only the android studio version is different. Is it possible that if I hadn't upgraded my android studio to "2.3.Beta 2" I could still build with 23.0.3?

Upvotes: 35

Views: 64760

Answers (6)

Aras
Aras

Reputation: 1597

I solved this issue:

added this code in android/build.gradle

```

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 26
                buildToolsVersion '26.0.0'
            }
        }
    }
}

```

Upvotes: -1

Mudassir Khan
Mudassir Khan

Reputation: 1782

Ok I found a solution to this.

For people facing the same problem in the future, here's what I did:

I added the following to my root build gradle android/build.gradle (Not the android/app/build.gradle)

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 25
                buildToolsVersion '25.0.0'
            }
        }
    }
}

That forces all the submodules to use the specified compileSdkVersion and buildToolsVersion. Problem gone now.

Upvotes: 5

xian19900116
xian19900116

Reputation: 1

Setting classpath 'com.android.tools.build:gradle:1.+' can resolve my problem when my project migrated from Android Studio 1.5.0 to 2.3.0.

Upvotes: 0

Eugen Pechanec
Eugen Pechanec

Reputation: 38223

if I hadn't upgraded my android studio to "2.3.Beta 2" I could still build with 23.0.3?

Yes.

You can still run the build process from command line with any version of build tools.

Feel free to upgrade build tools to 25.0.2 (latest as of 27.1.2017). This only affects build process, it doesn't affect the app behavior.

Newer versions of build tools incorporate more options and newer technologies and newer versions of Android Studio depend on these technologies.

Upvotes: 3

isabsent
isabsent

Reputation: 3763

You have to change top-level build.gradle from

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
//        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

to:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
//        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

Upvotes: 97

Rahul Karande
Rahul Karande

Reputation: 259

Yes u can do 2.3 studio is upto 25 supported you want to install sdk 19to25 in studio

Upvotes: 0

Related Questions