Android XML: "conflicts with another tag that has the same ID"

Invalidate Caches/Restart option sometime not working.

gradlew assembleDebug

Just try this command then see issue will no more available.


If you use view-binding, you can add this to the layout till you have better IDs for the Views:

tools:viewBindingIgnore="true"

Do it for each problematic layout.

I found this tip from here.


These files are created at compile time, so they might not have been deleted, Try invalidate caches and restart in android studio.


To add on how to invalidate caches, in Android Studio, go to File > Invalidate Caches / Restart > Invalidate and Restart