android: data binding error: cannot find symbol class

后端 未结 26 3016
生来不讨喜
生来不讨喜 2020-12-14 05:49

I am getting started for using DataBinding feature. I am facing problem with it.

Error:(21, 9) error: cannot find symbol class ContactL

26条回答
  •  死守一世寂寞
    2020-12-14 06:03

    You need to declare and pass the binding in the activity layout, not in the included layout.

    Example from the documentation:

    
    
       
           
       
       
           
           
      
    
    

    Here, there must be a user variable in both the name.xml and contact.xml layout files.

提交回复
热议问题