`android.packageBuildConfig=false` is deprecated

Viewed 848

After upgrading Android studio to 4.0.1 I am getting this error

android {
compileSdkVersion 28

android.packageBuildConfig = false

defaultConfig {
minSdkVersion 11
}

While I try to compile I get the error

Could not set unknown property 'packageBuildConfig' for extension 'android' of type com.android.build.gradle.LibraryExtension.

What is the alternative of packageBuildConfig? Thanks in advance

1 Answers

You can disable BuildConfig generation via buildFeatures

buildFeatures {
    buildConfig = false
}

Source

Related