Issue
I am trying to get databinding functionality implemented in code. In build.gradle I am adding databinding.enabled=true but it is giving error cannot resolve symbol enabled. How can this be corrected?
Solution
Well for the data binding enabled projects the Binding classes will be auto generated with name as LayoutNameBinding
But for most of the case the binding name for MainActivity will generated with same name creation logic, ie ActivityMainBinding since the layout name be activity_main.xml
ie the Layout name. eg if the layout name is custom_layout.xml, then the binding class name will be CustomLayoutBinding
Happy coding.. :)
Answered By - Sanoop Surendran
Answer Checked By - Cary Denson (JavaFixing Admin)