Complie version higher than Build tool

12,094

Solution 1

You can use

android {
  compileSdkVersion 27
  buildToolsVersion '27.0.0'

  defaultConfig {
    targetSdkVersion 27
  }

Read official guideline about Set Up the Android 8.1 SDK

Solution 2

1) Build tools version has nothing to do with compile SDK version.

Your current setup will work fine.

compileSdkVersion 27
buildToolsVersion "26.0.2"

2) You should use the newest build tools available.

If you had an old project you could say this:

compileSdkVersion 25
buildToolsVersion "27.0.0"

3) Build tools version is picked automatically in Android plugin 3.0.0.

You don't have to specify it. This is enough:

compileSdkVersion 27

Solution 3

If you are using last version of android-studio you can remove buildToolsVersion "26.0.2" from your gradle it's not mandatory.

The buildToolsVersion will work along-side with compileSdkVersion.

Share:
12,094
Priya
Author by

Priya

Updated on June 14, 2022

Comments

  • Priya
    Priya about 2 years

    Google have recently released API 27. I am planning to update my application with API 27. I have marked that there latest build tool is 26.0.2 and API is 27. If I use like below it can cause any issue in app ?

    compileSdkVersion 27
    buildToolsVersion "26.0.2"
    

    and Application's minimum and maximum API is like below

    minSdkVersion 16
    targetSdkVersion 27
    

    Thanks

    • Eugen Pechanec
      Eugen Pechanec over 6 years
      Hi, make sure you try before asking a question.
  • Priya
    Priya over 6 years
    Hello sir ! as per my knowledge 27.0.0 is not released yet !
  • Priya
    Priya over 6 years
    oh ! sorry sir ! Thanks for Your nice answer :)
  • Nafeez Quraishi
    Nafeez Quraishi almost 6 years
    Looks like you need to check gradle plugin version for this as well. I am getting this error: The specified Android SDK Build Tools version (27.0.0) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4. Android SDK Build Tools 27.0.3 will be used.