android studio 在Windows平台下出现uri is not registered

今天在Windows下开发android,因为Linux不能上网。我用的是android studio ,在修改xml的时候,刚打开build\res\all\debug\layout\activity_main.xml的时候发现里面有错误,uri is not registered,在网上找到了一个解决办法:http://stackoverflow.com/questions/6147051/intellij-android-project-schema-uri-not-registered ,试着操作了一下,结果又出现了另外一个错误,cannot find the decleartion of element  RelativeLayout, 找到一个帖子:http://stackoverflow.com/questions/16883427/android-studio-uri-is-not-registered 。原来是这样的:

是我打开的位置不对,不知道为什么Linux版本的android studio 和Windows上的文件夹布局不一样。正确的位置不在build下面而是在\src\main\res\layout\activity_main.xml这里面,在这块就可以修改了。

也就是说,生成的内容是没有错误的。是打开的位置有问题。

猜你喜欢

转载自zhangfortune.iteye.com/blog/1944418