Android 为什么我收到错误消息“URI 未注册”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20569610/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why am I getting error message "URI is not Registered"?
提问by Andrew Quebe
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:
我刚刚安装了 Android Studio 并且一切正常,但是在我的计算机关闭后我第二次打开了 AS,我收到以下错误:
"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.
这只是清单,但它发生在我所有带有该链接的 XML 文件中。我搜索了 Stack 并没有发现任何可以解决我的问题的东西。
回答by YosefBro
Maybe this is because it's not the main Manifest.xml
, but the debug Manifest..
Try editing app/src/main/Manifest
..
也许这是因为它不是 main Manifest.xml
,而是 debug Manifest .. 尝试编辑app/src/main/Manifest
..
回答by Cillín
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.
我有同样的问题。单击右下角的事件日志。您应该会看到一条消息,指出“在项目配置中检测到 Android 框架”。然后单击配置选项。这为我解决了问题。
回答by Yonatan Nir
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
一个有趣的解决方案,因为它让我想起了 Eclipse 过去的美好时光......我刚刚遇到了这个问题,为我解决的只是重新启动 Android Studio
回答by Clark Battle
What fixed it for me is that those xml files were missing the header line...
为我修复的是那些 xml 文件缺少标题行...
<?xml version="1.0" encoding="utf-8"?>
Adding that fixed the problem.
添加解决了问题。
回答by frank
I had this problem! Turns out I was editing a drawable in the resources
subfolder instead of the res
subfolder.
我有这个问题!原来我是在resources
子文件夹而不是res
子文件夹中编辑可绘制对象。