Android(安卓)Studio http://schemas.android.com/apk/res/android “URI is not registered”解决方案
16lz
2021-12-09
问题出现描述:
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
更多相关文章
- Android(安卓)Retrofit 2.0框架上传图片,视频解决方案
- [Android] Android(安卓)使用Greendao gradle 出现 Error:Unable
- android gridview 行高设置
- Android(安卓)版本兼容 — Android(安卓)6.0 和 7.0后获取Mac地
- [RK3399][Android7.1.1] WifiAp:开机默认打开wifi热点
- Android(安卓)Studio bug - attribute 'android:versionCode' no
- Android调用.NET Webservice报org.ksoap2.serialization.SoapPri
- Android获取设备唯一标识完美解决方案
- This Android(安卓)SDK requires Android(安卓)Developer Toolki