'android.dataBinding.enabled' is obsolete code example

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

// shorter version
// android.buildFeatures.dataBinding = true


// longer version

android {

  buildFeatures {

         dataBinding = true

         // for view binding:
         // viewBinding = true
    }
}

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

// shorter version
// android.buildFeatures.dataBinding true


// longer version

android {

    buildFeatures {

         dataBinding true

         // for view binding:
         // viewBinding true
    }
}

Tags:

Misc Example