Compile android project from command line

Compile android project from command line
0.0 0


Generally I prefer to work with vim and commandline over full fledged IDEs like eclipse.

So is there a way to compile the whole android project from command line, so that the Java- and C+±part ist compiled into an apk?

Thanks in Advance


Check out this tutorial:

./ && ant release && adb install -r ./bin/KoalaJump-release.apk && adb shell am start -a android.intent.action.MAIN -n "com.example/.YourActivity"


Dawid Drozd wrote:

./ && ant release && adb install r ./bin/KoalaJump-release.apk && adb shell am starta android.intent.action.MAIN -n “com.example/.YourActivity”

The ant release part was what I tried right before posting here.

But I got:

/home/nmelzer/Downloads/adt/cocos2d-2.0-x-2.0.4/cocos2dx/platform/android/java/build.xml:46: sdk.dir is missing. Make sure to generate using 'android update project' or to inject it through an env var

sdk.dir is set properly in trying the env did not work either:

export sdk.dir=~/Downloads/adt/android-sdk-linux
export: not valid in this context: sdk.dir

and android update project just tells me that the command isn’t found.

But the link Terry Bleger posted did help me a lot.

Thank you both!


Also you can use such command:

ant release -Dsdk.dir=$ANDROID_HOME$EDUKOALA_KEY && adb install -r .....


Dawid Drozd wrote:

Also you can use such command:

Yapp, thats the way it’s described in the linked tutorial, except that it is wrapped in a makefile.

Thanks again.