0

For specific reasons, I have to compile a phonegap/android project using ant tool. The project was created by eclipse, but compiling it and installing it on the device has to happen using ant. I did not run into any problems building native android projects using ant, but when I try the same with phonegap, it wouldnt recognize the library droidgap.

This is expected as phonegap.jar is not added automatically to the build.xml on creation. What I can't figure out on my own is how to link phonegap library to ant build.xml and whether or not that will successfully compile phonegap.

Please help, Thank you

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139

1 Answers1

2

ant will find phonegap.jar (and DroidGap), if you put phonegap.jar in {projectName}/libs

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • Fixed mine as well (hence the upvote), but what's the difference between /lib and /libs? I have a /lib with the cordova.jar file there, and if I copy it to /libs it works. Do I need it in both places? Is it the Eclipse ADT plugin vs. ant? – Waynn Lue Apr 24 '12 at 22:17
  • Now, it's ADT. See http://stackoverflow.com/questions/9820675/gson-noclassdeffounderror-after-adt-and-sdk-tools-update-to-v17 – Paul Beusterien Apr 24 '12 at 23:25