Intellij Android project schema URI not registered

2019-02-16 08:43发布

I'm using intellij CE 10.5 for my android projects and ran into a weird error. My project can be built by Eclipse and Ant, and also compiles under intellij. However, all the xml and manifest files are showing: xmlns:android="http://schemas.android.com/apk/res/android URI not registered in Settings | IDE Settings | Resources.

I tried ignore and manually create this but it didn't work out.

Anyone ran into similar issue? I didn't have problem w/ android SDK 2.x but this is a honeycomb 3.0 project, so just wondering if that matters.

thanks

4条回答
冷血范
2楼-- · 2019-02-16 09:22

Be sure your project is configured like android facet otherwise it will not work. => Project Structure : Project settings : Facets : add (+ button) android facet

This way fixed my problem.

查看更多
ゆ 、 Hurt°
3楼-- · 2019-02-16 09:24

I accidently opened the layout xml file which is in out folder (has output files for compile), not in res folder. Check that you opened the layout xml file in resource folder. The file names are identical.

查看更多
闹够了就滚
4楼-- · 2019-02-16 09:26

For me the problem was having a duplicate of my main module in the project structure. I removed the duplicate using the "-" button in the same dialog, and the problem got fixed.

查看更多
疯言疯语
5楼-- · 2019-02-16 09:37

If IntelliJ IDEA cannot find the specified DTD or schema, they are marked as errors. In this case special intention actions are suggested to:

Resolve the reference, if it is represented as a URL. Map a URI to a local file. Permanently ignore it. An ignored URI will not be highlighted as an error any more, until removed from the ignore list. Add Xsi schema location for external resources. A special attribute is added to point namespace location. Configure schema for your XML file. The schema for your XML file can be configured based on detecting schemas located locally in project sources or libraries.

From here--> http://goo.gl/heQCv

查看更多
登录 后发表回答