I am trying to package the android code into a jar file so that I can use it in another project. But when I do that I get the following error messages. I am not sure how to do this correctly if someone has done it please post a link and some details would be really helpful.
Thanks
Error generating final archive: Found duplicate file for APK: AndroidManifest.xml
Origin 1: C:\Users\Admin\workspace\Test\bin\resources.ap_
Origin 2: C:\Users\Admin\workspace\Test\lib\JarLib.jar
I have to use it in lots of project so I want to compile it as jar just like other libraries available online such as twitter4j, googleAnalytic, androidsupportlibrary and I need to know which folder are compulsory to include in Jar file. I have tried building it by excluding the resources folder and using eclipse->export, though it builds the jar but upon including it in another test project displays the above errors messages.
that error occurs when your content doesn’t contain a purely java files!!
If your “own classes” are purely Java, create a JAR file, and add that JAR file to whichever Android projects you want it in (put it in libs/ of the project, and also add it to your build path if you are using Eclipse). If you will be needing Android resources and such, though, you can create an Android library project, either for Eclipse or outside of Eclipse.
Or Project Properties -> Select Android Tab ->check isLibrary Option->Ok