When I am running an app in android studio using Android Sv2 Preview SDK, I am getting a warning:
Build Output
We recommend using a newer Android Gradle plugin to use compileSdkPreview = "Sv2"
This Android Gradle plugin (7.2.0-alpha04) was tested up to compileSdk = 31
This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=Sv2
to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdkPreview = "Sv2"
build.gradle (:app)
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 31
compileSdkPreview 'Sv2'
...
}
...
build.gradle (Project:...)
buildscript {
ext {
compose_version = '1.1.0-beta02'
agp_version = '7.2.0-alpha04'
}
}// Top-level build file where you can add configuration options common to all sub-
projects/modules.
plugins {
id 'com.android.application' version '7.2.0-alpha04' apply false
id 'com.android.library' version '7.2.0-alpha04' apply false
id 'org.jetbrains.kotlin.android' version '1.5.31' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
where can I get the correct AGP(Android Gradle plugin) version?
What is apply false in
plugins {
id 'com.android.application' version '7.2.0-alpha04' apply false
id 'com.android.library' version '7.2.0-alpha04' apply false
id 'org.jetbrains.kotlin.android' version '1.5.31' apply false
}