问题出现描述:

For me this was because I was using a debug and release build variant. I added the new folders src/debug/res/layout/some_layout.xml file manually, and it didn't recognize the URI.

使用build variant的时候在src建了和main同级的目录,然后res/layout下面拷贝了一个main下面正常的布局文件。然后就在

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

上面两行报错了:

URI is not registered ( Setting | Project Settings | Schemas and DTDs )

解决方案:

1.I switched the build variant to release, and then back to debug. This caused AS to reload something, and the error went away.这个方案没试验过

2.浏览statckoverflow其他页面的时候有人说是这版本的bug,建议升级。我升级之后重启as问题就解决了。不过我感觉具体原因应该是第一种方案说的as现在有bug,没有reload一些资源造成的。

http://stackoverflow.com/questions/16883427/why-is-android-studio-reporting-uri-is-not-registered

更多相关文章

  1. Android(安卓)Retrofit 2.0框架上传图片,视频解决方案
  2. [Android] Android(安卓)使用Greendao gradle 出现 Error:Unable
  3. android gridview 行高设置
  4. Android(安卓)版本兼容 — Android(安卓)6.0 和 7.0后获取Mac地
  5. [RK3399][Android7.1.1] WifiAp:开机默认打开wifi热点
  6. Android(安卓)Studio bug - attribute 'android:versionCode' no
  7. Android调用.NET Webservice报org.ksoap2.serialization.SoapPri
  8. Android获取设备唯一标识完美解决方案
  9. This Android(安卓)SDK requires Android(安卓)Developer Toolki

随机推荐

  1. 换到android 3.0出现duplicate value for
  2. ScaleImageView图片缩放查看器
  3. Android之旅 -- ARouter 使用介绍(一)
  4. android数据保存
  5. 在android中使用Realm数据库
  6. Android,一个函数实现指南针
  7. android classes.dex 反编译
  8. Android(安卓)Studio下,如何解决:java-An
  9. Android(安卓)带checkbox的listView 实现
  10. 手机扫描二维码下载APP,根据操作系统不同