DSL element ‘android.dataBinding.enabled’ is obsolete and has been replaced with ‘android.buildFeatures.dataBinding’.
It will be removed in version 5.0 of the Android Gradle plugin.
实际上就是换一种写法。
原来:
dataBinding { enabled true }
现在:
buildFeatures{ dataBinding = true // for view binding : // viewBinding = true }