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.
- 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
- 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.