Duplicate entries in Android class generated by R

I have this line

  public static final int text_view222=0x7f060077;

It is repeated in my r.java file and causes an error in my Android application. Any organization knows how to solve this problem. Update:

When I add them as library projects, I have other R files from another project

resolvent:

I spent an hour before and after facing this problem. I found that I have a textview, which has a space character before the ID name and another textview without spaces. So in your case, you have some positions in the layout file. Check the spaces in front of the ID name

<TextView android:id="@+id/ text_view222"
...
...
..
/>

There is also a person who has no space

<TextView android:id="@+id/text_view222"
...
...
..
/>

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>