View must have a tag error in android data binding

前端 未结 7 2266
清酒与你
清酒与你 2021-02-13 05:54

I\'ve two layouts for a screen. Activity works fine while setting a layout for Mobile device but it\'s causing error while setting layout for tablet device. The main issue is:

7条回答
  •  迷失自我
    2021-02-13 06:26

    I ran into this when I had:

    • A library module defining a layout resource
    • An app module that depended upon that library module defining the same layout resource
    • The library layout resource was set up for data binding (e.g., root element), but the app module's edition of that layout resource was not

    In my case, the app module's layout was left over from when I created the project. Removing it cleared up the problem.

提交回复
热议问题