rupps
rupps

Reputation: 9887

Manually compiling with ANT an Android eclipse project

I have an eclipse project. This project is pretty complex, uses 2 or 3 library projects and finally runs proguard.

I can build the project from the eclipse GUI, and everything's cool.

However, when I run it from command line, ant release fails with proguard complaining about things I think are related to missing library components.

At first sight there are subtle differences, like ANT not respecting files marked for exclusion in eclipse GUI, and I suppose if I found this, there'd be some other things as well. The build sequence gets pretty far, but ultimately always fails to build the project.

Upvotes: 0

Views: 63

Answers (1)

sergej shafarenka
sergej shafarenka

Reputation: 20406

I also compile a project which has dependencies on 4 more library projects and uses 3 more jar library files. The Ant script compiles, makes obfuscation with proguard and signs the apk at the end with no issues what so ever.

To make all this working I simply needed to update project to use ant build as it is described in official Android documentation.

  1. Open project's folder and call android update project -p .
  2. Repeat same for all library projects

That should be enough to make everything compilable. Maybe if you run this command it fixes issues you have. If it's not, please let us know what proguard error you have exactly.

Upvotes: 1

Related Questions