4

昨晚我升级了我的 Android Studio 4.0,它在 View Binding 中显示错误。我在我的 Gradle 中尝试了以下代码。但它显示这样的错误,

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
   }
}
4

1 回答 1

-1

尝试:

dataBinding{
    enabled = true
}
于 2021-01-19T20:53:15.020 回答