Android Studio: Error parsing XML & URI is not registered

后端 未结 8 1496
别跟我提以往
别跟我提以往 2020-12-09 02:38

After adding a new Activity to my project I get following error while compiling the layout

Gradle: Error parsing XML: not well-formed (invalid token)<

8条回答
  •  旧巷少年郎
    2020-12-09 03:05

    I got the same error for a long time and none of the answers I found online really helped me, or probably I wasn't looking the right way. At the end what I found out was the way I named the directory. So, I was trying to make the landscape layout for my app and named it layout_land. That kept showing me the URI is not registered error. I just had to change the directory name to layout-land.

    Summary: No underscores in directory names!

提交回复
热议问题