22


I just installed Android Studio and everything ran fine but then I opened AS for a second time after my computer had turned off and I am getting the following error:

"URI is not Registered"

On the following lines of code:

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

This is just the manifest, but it's happening on all of my XML files with that link. I've searched Stack and found nothing that solves my issue.

Nikola Despotoski
  • 49,966
  • 15
  • 119
  • 148
Andrew Quebe
  • 2,263
  • 5
  • 25
  • 53
  • possible duplicate of http://stackoverflow.com/q/16883427/794088 (has worthy answers!) – petey Dec 13 '13 at 15:13
  • 9
    @petey - I found this thread and I can assure you, this isn't a duplicate. He was working inside a layout whereas I'm working throughout my entire application. – Andrew Quebe Dec 13 '13 at 23:38
  • Any Updates on this? I am getting Uri not registered on my Ubuntu Android Studio 1.2 – ARK Jul 09 '15 at 19:29
  • 1
    @akshayrajkore I haven't had the issue in a long time. I updated Android studio and that did the trick. I'm still not sure what the problem is. Maybe try Cillin's answer. Let me know if it works, if it does I'll mark it as best answer. – Andrew Quebe Jul 09 '15 at 20:44
  • Please check this [answer](http://stackoverflow.com/questions/17511254/android-studio-error-parsing-xml-uri-is-not-registered). Hope this will help Summved – Summved Jain Apr 05 '16 at 09:08

6 Answers6

15

Maybe this is because it's not the main Manifest.xml, but the debug Manifest.. Try editing app/src/main/Manifest..

YosefBro
  • 596
  • 1
  • 7
  • 17
3

I had this issue when creating alternate resources for different app "flavors". I used the built-in Image Asset Generator to do everything (both folder and image generation), so I was fairly certain it was not due to an error that I had made.

When switching "flavors" in the Build Variants pane in Android Studio, the unused res folder (meaning, from the variant/"flavor" that is NOT active) gets a plain folder icon as opposed to the "res" folder icon.

So any res XML files in that currently inactive folder cannot anymore be processed as res files because Android Studio temporarily doesn't know that this is a res folder - until you switch variants and the same thing happens to the other variant's res files.

The solution is to create an almost empty manifest file in each flavor's root folder as I described in my answer here: https://stackoverflow.com/a/63224818/5916188. Somehow, this makes Android Studio realize that this is actually a res folder despite that it's not the active variant and therefore currently inactive.

For example, if you have a flavor called "pro", right-click on the pro folder then choose new * other * Android Manifest File. Do the same for any other flavors, too.

My "dummy" AndroidManifest.xml file in each flavor contains only:

<manifest>
    <application/>
</manifest>
Sam
  • 1,009
  • 10
  • 13
  • Yep this was my issue too when I upgraded from 4.01 to 4.1. In fact I was into a heavy lint warning clean up and when I upgraded this killed my progress and more lint errors and warning showed up. This was one issue, thanks! – JPM Oct 20 '20 at 15:24
2

I had the same problem. Click on the event log on the bottom right-hand corner. You should see a message saying "Android framework is detected in the project Configure". Then click the configure option.This solved the problem for me.

Cillín
  • 187
  • 1
  • 13
1

What fixed it for me is that those xml files were missing the header line...

<?xml version="1.0" encoding="utf-8"?>

Adding that fixed the problem.

Clark Battle
  • 630
  • 1
  • 8
  • 16
1

I had this problem! Turns out I was editing a drawable in the resources subfolder instead of the res subfolder.

frank
  • 1,322
  • 1
  • 10
  • 28
1

A funny solution since it reminds me of the Eclipse's good old days... I just had this issue and what solved it for me was simply restarting Android Studio

CodeMonkey
  • 11,196
  • 30
  • 112
  • 203