Xilconic Xilconic - 1 year ago 158
Android Question

Why is Android Studio reporting "URI is not registered"?

So I've given Android Studio a try, because I really like Resharper and noticed that the IDE had some of their functionality built into it. Having now created a default new project, I added a new layout file and wanted to change the existing default 'hello world' example layout, and I got an "URI is not registered" error on the following lines:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

I've done nothing else to the default generated project yet. I've come across another question that seems to be related (Intellij Android project schema URI not registered?), but just ignoring something feels odd to me. I actually tried it, but that causes
(and probably all other Android related stuff) to be not recognised any more (error message: "Cannot find the declaration of element 'RelativeLayout'").

Any ideas on how to solve this problem?

Answer Source

You are having this issue because you are at the wrong destination! The correct directory for the Layout resource file has to be under "res-layout" not "res-all-layout"

Let me know if that solved the issue for you... good luck

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download