4

Last night I upgrade my Android Studio 4.0, it shows error in View Binding. I have tried the below code in my Gradle. But it shows error like this,

Could not find method buildFeatures() for arguments [build_99kmfmmumw2bmow3xjrnbxlx1$_run_closure1$_closure5@4155ecc3] on extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
android {
   buildFeatures {
       viewBinding = true
   }
}
Syntle
  • 5,168
  • 3
  • 13
  • 34
Vijay Villiers
  • 423
  • 1
  • 4
  • 12

1 Answers1

-1

Try with:

dataBinding{
    enabled = true
}
  • While this code snippet may solve the question, [including an explanation](http://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. – codedge Jan 21 '21 at 15:05
  • This turns on Data Binding, not View Binding. – Ari Lacenski Jun 10 '21 at 22:22