开发者

If I change an external library: AndroidManifest, cannot parse file

开发者 https://www.devze.com 2023-02-19 21:01 出处:网络
I open an older project which has a normal Android 2.2 external library registered. I want to use Google maps and I change the external library to Android 2.2 Google APIs. 开发者_如何学JAVAAfter that

I open an older project which has a normal Android 2.2 external library registered. I want to use Google maps and I change the external library to Android 2.2 Google APIs. 开发者_如何学JAVAAfter that I cannot parse the manifest file and I get an error:

AnroidManifest.xml
Error: Cannot parse file

The error is on the 2nd line in the URI

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

If I hover the error, I get the message: URI is not registered.

What's even more weird, when I return an old lilbrary to the project (a normal 2.2), I still have the same error.

What could be the reason for this?

PS. The IDE I use is IntelliJ IDEA.


Try IDEA 10.5 EAP, it has improved Android support and easier SDK configuration. File | Invalidate caches may also help.


Unfortunatelly, I couldn't find the solution to this issue and, so far, the only way to solve is to create a new project with correct external libraries and to copy files into it.


Make sure you only have lower caps characters in the path to the file.


In IDEA 12 at least, Preferences > Schemas and DTDs, press the + to add External Schemas and DTDs, in the URI edit field add "http://schemas.android.com/apk/res/android", press OK to save. This was a little flaky, I had to do it twice, but it worked, the error is gone.


You should maybe check the configuration of your modules. Be sure to mark the relevant folders as "Sources", "Test Sources" or "Excluded".

I had a namespace warning in res/anim/fade_in.xml. When I marked the resource folder of my project as "Sources" as shown in the screenshot the namespace errors disappeared.

If I change an external library: AndroidManifest, cannot parse file

0

精彩评论

暂无评论...
验证码 换一张
取 消