The solution to the abnormal problem of Android Studio 4.0 upgrade

1. dataBinding open configuration modification

After upgrading to AS 4.0, the following warning appears

DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'

Solution:

Open the original DataBinding method

dataBinding {
    
    
 enabled = true
 }

Replace with

buildFeatures{
    
    
dataBinding = true
// for view binding :
// viewBinding = true
}

It can be solved.

To solve the problem, refer to the new features of Android Studio 4.0 and the solution of the upgrade abnormal problem

Guess you like

Origin blog.csdn.net/ambitionLlll/article/details/112858244