7 Answers
7

I figured out what the problem was. I included a JAR file that had an AndroidManifest.xml file in it, which was conflicting with my own project's AndroidManifest.xml file. The solution in my instance was to rebuild the JAR file, making sure it excluded its own version of AndroidManifest.xml, then to re-include the new version of the JAR file into my project. You might need to clean the project after doing this.

How did you exclude AndroidManifest.xml when rebuilding the jar file?
–
PhillipNov 23 '11 at 6:20

3

My solution was to delete the manifest from the original app. This caused an error but I did not care, exported it as jar, added the jar to the project, and that's all
–
erdomesterJun 11 '12 at 21:38

2

Or you can click export from eclipse then select the jar then you get a window unselect the AndroidManifest.xml in the upper right window and now click finish thats about it
–
Sheraz Ahmad KhiljiApr 2 '13 at 3:55

I got a second (ungracefull) AndroidManifest.xml file by including an Android.R package instead of the com.example.mypackage.R.

Symptoms: build seemed to work, but launching showed the existing Error in workspace, which needed to be fixed first.
One AndroidManifest.xml was found in classes, the other in a file called resources.ap_ .
I simply quickfixed (include android.R) workspace to hell.

edit: didn't work either, workspace still in in hell; problems in projects, which liked to be fixed...

edit1: can't find the package, with should hold the AndroidManifest.xml.

edit2: I consider to assume the second Manifest File in Android.jar - seems like each Manifest file results in generated 1 R.class. I erased complete workspace. Because it was playground anyway. (Then I set up Git.)

I had got the same problem some days ago, if you put a JAR inside libs folder and the JAR has inside a AndroidManifest.xml you got the error. If you put the JAR outside the project (for example on desktop) and in "java Build Path" you use "Add external JAR" the problem is solved.