Monday, February 28, 2011

To build android app on Command line(Windows)

Most of the android developers used to build their android app using the IDE like netbeans or Eclipse.


This information is for the ones who want to build their android app using command line..
Install JDK,
Install Android SDK,
Install Apache Ant,


To create a new Android project, open a command-line, navigate to the tools/ directory of your SDK and run:

android create project \
--target <target_ID> \
--name <your_project_name> \
--path path/to/your/project \
--activity <your_activity_name> \
--package <your_package_namespace>


Set the path to JDK and ANT as below


set JAVA_HOME=C:\Progra~1\Java\jdk1.6.0_20
set PATH=%PATH%;S:\Progra~1\apache-ant\bin


To debug the application, 

ant debug
To build
ant release

No comments:

Post a Comment