Updating Android studio project and migrating to Kotlin dsl. I see the above warning wrapping the buildFeatures block where i enable dataBinding and more recent viewbinding features, my AS and gradle, kotlin plugin versions are as below:
Android studio V4.0
// defined in buildSrc\build.gradle.kts
val kotlinVersion = "1.3.71"
val gradleVersion = "4.0.0"
everything is workging fine except, for a warning on this block in my (app) build.gradle.kts on all 3 lines:
buildFeatures{
dataBinding = true
viewBinding = true
}
the warning messages that appear when hovering over each line are as follows:
'buildFeatures(kotlin.jvm.functions.Function1<? super com.android.build.api.dsl.ApplicationBuildFeatures,kotlin.Unit>)'
is unstable because its signature references unstable 'com.android.build.api.dsl.ApplicationBuildFeatures'
marked with @Incubating
'getDataBinding()' is declared in unstable 'com.android.build.api.dsl.BuildFeatures' marked with @Incubating
'getViewBinding()' is declared in unstable 'com.android.build.api.dsl.BuildFeatures' marked with @Incubating
Any clue on why are they marked as warnings, the same block was in the original build.gradle file before converting to .kts
Don't worry, it's just a friendly warning, that you are using @Incubating
class. Let's look into definition:
Indicates that a feature is incubating. This means that the feature is currently a work-in-progress and may change at any time.
So don't worry, and use it, and eventually update it in the future. Probably, it will be marked as stabled in some future Android Studio and plugin versions.
----- EDIT -----
If you would like to remove this warning then put @Suppress("UnstableApiUsage")
above your line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With