After upgrading gradle 4.0.0 app build failed with error message:
No such property: variantConfiguration for class: com.android.build.gradle.internal.variant.ApplicationVariantData
is there any way to migrate gradle ?
android.applicationVariants.all { variant ->
variant.outputs.all {
def buildType = variant.variantData.variantConfiguration.buildType.name
...
}
}
app level gradle file
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
In the last gradle
Relase ApplicationVariant
implement BaseVariant
Instead of
def buildType = variant.variantData.variantConfiguration.buildType.name
Should be
def buildType = variant.buildType.name
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