How to prepare your machine for developing android apps?

In this post I will state the required steps that you have to do for making your machine ready to develop your android applications. I think what happened with me happened with you too, when anyone starts to learn a new technology, language, or application he first should know how to prepare its environment/install this new thing into his machine. He follows the preparation/installation instruction and go ahead. once he made that and continue his learning process, he forget how to prepare/install these things. If his machine is crashed or want to prepare another machine, he will refer to prepare/installation chapter again.

That happened with me when I learned Android on Win XP Then installed Win7 on my machine.So I thought it will be better if I write a post to keep these steps in brief.

As you know (or may not!!!!!!!!!!!) android platform using Java programming language. That means we want JDK to develop and run our android application (on emulator) and we want any java IDE, I am using Eclipse.

Now lets state our steps of preparation

  1. Download latest version of JDK form
    http://www.oracle.com/technetwork/java/javase/downloads/index.html and install it.
  2. Set the JAVA_HOME environment variables
    • On Win XP go to Start >> My Computer, Right Click to get properties window , choose the advanced tab, and click Environment Variables. Click New to add the variable, or Edit to modift it if it already exists. The value of  JAVA_HOME will be C:\Program Files\Java\jdk1.7.0 . Of course this path may be different according to your windows root and the version of JDK.
    • On Win7 go to Start >> My Computer, Right Click to get properties window, click the link for advanced system setting and click Environment Variables then follow the same instruction as for Win XP.
  3. Download Java IDE, I am usnig Eclipse. You can download it from http://www.eclipse.org/downloads/ and select Eclipse IDE for java EE developer  32 bit version or 64 bit version depending on your system.
  4. When you run Eclipse for first time it will ask you for a location for a work space. It is up to you, select any folder on your machine to be your workspace.
  5. Download latest version of Android SDK from  http://developer.android.com/sdk/index.html. it is recommended for windows users to download an installer EXE instead of .zip file. Running the installer file will check for the java JDK, unpack the embedded files and run the SDK Manager program to help you setup the reset of the downloads.
    • When you first install the Android SDK it doesn't come with any platform versions. Once you have  launched the SDK Manager, it will checks for installed/not installed platforms. You can select any platform and add-ons you want.
  6. You will need to add Android SDK to your PATH environment variable. Go to Environment Variable Window as explained in step 2.
    1.  Select PATH variable and click Edit.
    2. On the value field Add semi-colon(;) on the end
    3. Add the path to the android SDK tools folder(C:\Program Files (x86)\Android\android-sdk\tools) followed by semi-colon(;).
    4. Add the path to the android SDK platform-tools folder(C:\Program Files (x86)\Android\android-sdk\platform-tools) followed by semi-colon(;).
    5. Add %JAVA_HOME%\bin
    6. Click OK
      (Note the paths to directories may be different according to your machine)
  7. Now you need ADT, An Eclipse plug-in that helps you to create, test, and debug your Android applications.  Launch Eclipse IDE and follow the next instruction.
    1. Select the Help menu item and choose the Install New Software... option.(This was called Software Updates in older versions of Eclipse).
    2. Type https://dl-ssl.google.com/android/eclipse/ in Work with field and press Enter. Eclipse will populate the list below.
    3. You should see Developer Tools item with four children: Andriod DDMS, Android Devlopment Tools, Android Hierarchy Viewer, and Android Traceview . You should select the parent node and also make sure all children nodes is selected too then click Next button.
    4. Eclipse will ask you to verify the tools to install, click Next again.
    5. You will be asked to Accept the ADT license. Accept it and click Finish button.
    6. Eclipse will download the developer tools and install them for you. You will need to restart Eclipse for the new plug-in to show-up in the IDE.
    7. Select Window menu item in Eclipse IDE and choose Preference. In the preference Dialog box  select the android node and set the SDK location field to the path of Android SDK, Then click  Apply button.
Now your machine is ready for android development, Enjoy!!!!!!!!

Comments

Popular posts from this blog

Android : How to change progress bar color at runtime programmatically?

ASP.Net MVC : Conditional Validation using ValidationAttribute

How to fire RowCommand event of nested GridView?