Android : How to generate a .jar file of library project that uses other .jar files?

on Sunday, September 28, 2014


What I have:



  • An Android library project in Eclipse, which makes use of other libraries (as jars) -> nineoldandroids


What I want:



  • Create a single .jar file that contains my library code, as well as all necessary other jar files (nineoldandroids) my library depends on.


What I did:



  • Use the Eclipse File->Export->Jar function to export my library

    • I Checked both "Export generated class files and resources" and

    • "Export java source files and resources"



  • Everything went fine and I tried to use the library in an Android application

  • All library classes are recognized, but I get the following error:



The type com.nineoldandroids.animation.ObjectAnimator cannot be resolved. It is indirectly referenced from required .class files



I suppose the reason therefore is that the nineoldandroids .jar file is not properly included when I generate the .jar file from my library project.


What can I do to resolve this problem?


0 comments:

Post a Comment