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

Monday, February 7, 2011

How to set up IDE (Eclipse) for Android app development

Below is the steps to set up IDE for android app development

Download Android SDK starter package from http://developer.android.com/sdk/index.html and install.

Open Android SDK manager, install the available packages to the SDK. (I selected all the packages to install, it took around 3 hours to complete the installation)

Download Eclipse Classic 3.6.1 from http://www.eclipse.org/downloads/

Extract the package and start eclipse.exe

Start Eclipse, then select Help > Install New Software....

Click Add, in the top-right corner.

In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:

https://dl-ssl.google.com/android/eclipse/

In the Available Software dialog, select the checkbox next to Developer Tools and click Next.

In the next window, you'll see a list of the tools to be downloaded. Click Next.

Read and accept the license agreements, then click Finish.

When the installation completes, restart Eclipse.

Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).

Select Android from the left panel.

For the SDK Location in the main panel, click Browse... and locate your downloaded

SDK directory.

Click Apply, and then OK.

If you are having trouble downloading the ADT plugin after following the steps above, then go to http://developer.android.com/sdk/eclipse-adt.html#installing, for manual installation steps.

“Hello world” tutorial is available here http://developer.android.com/guide/tutorials/hello-world.html