viewbinding: android.defaults.buildfeatures vs. buildFeatures{}?

44 views Asked by At

What is the difference between:

 android.defaults.buildfeatures.viewbinding=true 

in gradle.properties

vs.

 buildFeatures{ viewBinding true }

in app build.gradle.kts

?

Is the former preferred over the latter?

Popup text in Android Studio:

Flag to enable View Binding.
Setting the value to null resets to the default value. Default value is false.
You can override the default for this for all projects in your build by adding the line android.defaults.buildfeatures.viewbinding=true in the gradle.properties file at the root project of your build.
More information about this feature at: TBD
0

There are 0 answers