Data Binding Android - Type parameter T has incompatible upper bounds : ViewDataBinding and MainActivity

后端 未结 16 1547
伪装坚强ぢ
伪装坚强ぢ 2020-12-11 00:27

I am using Android Studio 2.0 Preview 4. I\'m using Android SDK tools 25 rc1. This error persists no matter how many times I clean / rebuild project. File->Invalidate Caches

16条回答
  •  时光取名叫无心
    2020-12-11 00:41

    One of the quickest hack i use is rename the xml file back and to.

    e.g.

    rename abc_layout.xml to abc_layout2.xml. once the binding import shows error rename it back to abc_layout.xml.

    the short cut to rename is shift + F6. its way quicker that entire project rebuild. this will only remove error from one file though.

提交回复
热议问题