Android XML:&Quot;与具有相同ID&Quot;的另一个标记冲突

本教程将介绍Android XML:&Quot;与具有相同ID&Quot;的另一个标记冲突的处理方法,这篇教程是从别的地方看到的,然后加了一些国外程序员的疑问与解答,希望能对你有所帮助,好了,下面开始学习吧。

问题描述

我最近从我的项目中删除了一个片段,包括它的布局和视图模型。(FragmentAddFlight,VmAddFlight,FragmentAddFlight_flight.xml)

令人惊讶的是,我收到以下错误:

 [databinding] {"msg":"u003cImageView idu003du0027@+id/imageView2u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":277,"col0":20,"line1":286,"col1":85}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView4u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":308,"col0":28,"line1":312,"col1":64}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/editText8u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":314,"col0":28,"line1":318,"col1":60}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView5u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":327,"col0":28,"line1":331,"col1":63}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView14u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":333,"col0":28,"line1":338,"col1":57}]}
  [databinding] {"msg":"u003cImageView idu003du0027@+id/imageView2u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":369,"col0":20,"line1":378,"col1":72}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView4u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":400,"col0":28,"line1":404,"col1":60}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/editText8u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":406,"col0":28,"line1":410,"col1":60}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView5u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":419,"col0":28,"line1":423,"col1":71}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView14u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":425,"col0":28,"line1":430,"col1":57}]}
  [databinding] {"msg":"u003cImageView idu003du0027@+id/imageView2u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":452,"col0":20,"line1":461,"col1":77}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView4u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":483,"col0":28,"line1":487,"col1":60}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/editText8u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":489,"col0":28,"line1":493,"col1":60}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView5u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":502,"col0":28,"line1":506,"col1":71}]}
  [databinding] {"msg":"u003cTextView idu003du0027@+id/textView14u0027u003e conflicts with another tag that has the same ID","file":"C:UsersChristophDocumentsAndroid-ProjekteFlightLoggerappsrcmainreslayoutfragment_add_flight.xml","pos":[{"line0":508,"col0":28,"line1":513,"col1":57}]}

请记住,这些错误中引用的文件已被删除。为什么我会收到这些错误?

我通过Build->Clean Project清理了该项目。我试着通过同样的菜单重建这个项目。但结果保持不变。

有人知道怎么解决这个问题吗?

推荐答案

这些文件是在编译时创建的,因此它们可能没有被删除,请尝试在Android Studio中失效缓存并重新启动。

好了关于Android XML:&Quot;与具有相同ID&Quot;的另一个标记冲突的教程就到这里就结束了,希望趣模板源码网找到的这篇技术文章能帮助到大家,更多技术教程可以在站内搜索。

0
没有账号?注册  忘记密码?