android: data binding error: cannot find symbol class

后端 未结 26 2979
生来不讨喜
生来不讨喜 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 05:59

    I consistently run into this problem. I believe it has to do with android studio not being aware of dynamically generated files. If you have everything else right for databinding try to File > Invalidate Caches/Restart... and select Invalidate Caches and Restart. Then try and import the BR file... it should import fine.

    You may have to throw in a Clean and Rebuild.

提交回复
热议问题