Background
When you are developing android application you might sometime see following error on your layouts xml files in Android studio-
- URI is not registered (Settings | Project Settings | Schemas and DTDs)
Everything seems correct except this error is persistent. Gradle sync works fine too. Lets see how we can resolve this.
Solution
- Before we see how to resolve this issue make your layout file is in correct directory structure. It should be under layout folder which would be under res folder.
- Now look at build variant tab at the bottom left of android Studio. You should see the current version set. It could be -
- debug OR
- release
- If above 2 methods did not work out for you then Close all open tabs and reopen them.
- Last but not the least - restart Android Studio.
You Should Give a Name of Created New Layout as layout-land or anything instead of land but the important is to give a starting name as layout-
ReplyDeleteWhat to do when I have no build variants tab at the bottom left of android Studio?
ReplyDeleteFrom your View menu, select Tool Windows, then Build Variants. Then you will see either "debug"or "release", and you can switch between these.
Deletenone of them helped me
ReplyDeleteThis is not happening in my project res>layout folder but actually this is happening when I am building my application then it is happening in my debug folder layput files
path \app\build\intermediates\data-binding-layout-out\debug\layout\layoutabc.xml
Please help me out
I am getting this error in my AndroidManifest.xml file.
ReplyDelete<manifest xmlns:android="http://schemas.android.com/apk/res/android"
In my layout files, the xmlns line is fine.
I have tried all these solutions, but the problem persists. Do you have any suggestions?
The project is imported. The original was probably created in Eclipse.
I have the same problem in AndroidManifest, recently raised. None of the solutions here works...
ReplyDeleteuri is not registered
ReplyDeletewhat to do when in build variant option there is nothing to show
ReplyDeleteMine too is displaying "Nothing to Show".
DeleteThis isn't working for me
ReplyDeletedoesn't work on mine too
ReplyDeletesame issue ...http://schemas.android.com/apk/res/android not registered
ReplyDeletetried everything ....but couldn't fig out the error.
Try this one file=>invalidate catch/Restart....
ReplyDeleteCopy the URI
ReplyDeleteOpen file option>settings>Languages & frameworks>schemas and DTD's
In ignored schemas and DTD'S click on + symbol on the right side then paste the URI . Click apply then click ok.
Hope it solves the problem
it was really helpful, what you have to look for, please check if any XML does have a repetition/doubling of the schemas and resources. This happens if the schemas or resources have written twice by mistake and they are overlooked. Thank you, Sabihuddin.
ReplyDelete