Android - DataBinding - How and when the Binding classes will be generated?

后端 未结 18 1778
小蘑菇
小蘑菇 2021-02-03 16:51

DataBinding Guide States

  By default, a Binding class will be generated based on the name of the layout 
file, converting it to Pascal case and suffixing “Bindi         


        
18条回答
  •  情深已故
    2021-02-03 17:05

    Try to rename layout to main_activity.xml.

    In my case, it didn't work to generate binding class for "activity_main.xml".
    But renaming the layout file to main_activity.xml worked just fine.

提交回复
热议问题