• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How do I determine which Android Gradle Plugin version is needed for my target SDK?

I am trying to sync my project with the Gradle files but every time I do it I get the same error message:

WARNING: The specified Android SDK Build Tools version (27.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.

The problem is that the Android Gradle Plugin can't support an Android SDK Build Tools version as low as 27.0.0 but I need a lower Android SDK Build Tools version in order to build an Android app with an older API version. My target SDK version is API 24 since I am developing an app for an Android 7.0 (Nougat) operating system.

I looked over the Android Developers site: https://developer.android.com/ and I can't find anything about what Android Gradle Plugin corresponds with which target SDK version. I've read several Stack Overflow questions where people asked about which specific Android Gradle Plugin they need for their project but none of the questions were about where to go to find that information.

Can anyone tell me how to know which Android Gradle plugin version I need?

Here are the two build.gradle files in my app folder:

(Module: app)

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion '27.0.0'

defaultConfig {
applicationId "com.android.example.favoritetoys"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
debuggable true
}
debug {
applicationIdSuffix ".debug"
debuggable true
}
}

}

(Project)

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:3.2.1'
}
}

allprojects {
String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("windows")) {
buildDir = "C:/tmp/${rootProject.name}/${project.name}"
}
repositories {
jcenter()
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
 
Back
Top Bottom