Android Automated/Command Line Build

Put your problem here if it does not fit any of the other categories.

Android Automated/Command Line Build

Postby mmenaker » Thu Jun 04, 2009 11:26 pm


I have multiple Android projects that I have developed with Eclipse. I want to add them to an automated build but not sure how to do that.

Also one of the Android projects is a library that the other projects rely on. Would it be possible to export the jar from a command line as well?

I have tried to export an application to an ant file and getting the build.xml. However it only builds when the project itself has already been built through Eclipse. If I change a source file and run ant from the command line I get:
Buildfile: build.xml



[echo] AndroirdProject: C:\Android\Project\\build.xml
[javac] Compiling 1 source file to C:\Android\Project\bin
[javac] javac: invalid target release: 1.6
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac] -g Generate all debugging info
[javac] -g:none Generate no debugging info
[javac] -g:{lines,vars,source} Generate only some debugging info
[javac] -nowarn Generate no warnings
[javac] -verbose Output messages about what the compileris doing
[javac] -deprecation Output source locations where deprecated APIs are used
[javac] -classpath <path> Specify where to find user class files
[javac] -sourcepath <path> Specify where to find input source files
[javac] -bootclasspath <path> Override location of bootstrap class files
[javac] -extdirs <dirs> Override location of installed extensions
[javac] -d <directory> Specify where to place generated class files
[javac] -encoding <encoding> Specify character encoding used by source files
[javac] -source <release> Provide source compatibility with specified release
[javac] -target <release> Generate class files for specific VM version
[javac] -help Print a synopsis of standard options


I'm not sure why it doesn't recognize the correct java version.

Posts: 6
Joined: Thu Jun 04, 2009 11:15 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests