Thursday, December 15, 2011

How to Setup Android Environment on Your PC?

I'm putting my best efforts for very beginners / starters of Android Developers.

First thing before we go to start developing an Android Application, we need to setup Android Development Environment on our PCs/ Laptops( for Windows XP, 7 etc).

You may check your system, whether it supports android or not:
 
Android has big advantage that it supports maximum Operating systems, and meets most of the hardware and software requirement easily.

Lets begin with the installation steps, just read step by step and implement on your PC!

Step # 1:
Download following software(s).

  • JRE (if not already installed)

Install JDK, then Android SDK.
(Open SDK Manager from Start Menu, & Let the selected platforms be downloaded like Android 1.5, 1.6, 2.1,2.2,2,3 .. So on)

Note:
Android platforms are downloaded at the place where android sdk is installed 
e.g. C:\Program Files \Android\android-sdk-windows\
 This folder contains platforms, tools, drivers, samples for every platform. So you can copy and save this folder to any flash drive or your local drive after downloading all the platforms, in case of re-installation of SDK, you won't need to download these platforms and tools again. :)


Step # 2:
Setting up environment...
  • Create a folder name "AndroidEnvironment" or simply "Android" in any of your local hard drives, mostly that drive is preferable where your sdk is installed. i.e. C:\Android
  • Extract your downloaded eclipse zip file in this folder i.e. C:\Android\eclipse\
  • Create a folder named "Projects" or "Workspace" or any other name inside this Android folder previously created i.e C:\Android\Workspace\ 
Note:This step is not really necessary but it is a good practice especially for me when i want my all work to be at save at one place, and access working environment from the same place(folder).
  • In eclipse folder, open file eclipse.exe, if it asks to install Java, then follow these steps: Go to "ProgramFiles\ Java\Jdk 1.6\" , you'll see a folder named "jre" just copy it and paste it to "C:\ProgramFiles\Android\eclipse\"
  • Now again hit on eclipse.exe, set workspace as "C:\ProgramFiles\Android\Workspace".
  • As Eclipse IDE is opened, we have to set it to work for Android Projects, you need to go to Help>Install New Software>Add , you see two text boxes Name & Location. In Name Place , write "ADT Plugin" , In location place either write this URL which will download ADT plugin from internet https://dl-ssl.google.com/android/eclipse/ or click on Archive button and find your ADT-11.0.Zip file location (which you downloaded in step# 1).
  • Click OK, and wait for ADT plugin to get installed, the process of installation will complete itself with some agreement like :"I accept agreement...", either in background or in front, and it will ask you to restart eclipse to complete installation.
  • After ADT plugin is installed, go to (in eclipse) Window> Preferences> Android ,in SDK Location box, browse the path "C:\ProgramFiles\Android\adroid-sdk-windows\" ,click on Apply, you  will see some List of SDK Target platform, e.g the platforms you downloaded. click OK and close this window.
Step # 3:

Last but not the least to confirm your installation is correct or not, finally go to File> New> Android Project to start up creating Android application.


And If you dont find Android Project option in New menu, then go to File>New> Other> Android.

Then you get a dialogue asking for Project name, Application name etc. If this option shows it means you have successfully installed ADT Plugin and all required tools for Android Project.


Now what is next? How to create an application in android?
Coming up with some new posts :)
------------------------------------------------x-x-x-----------------------------------------------------

May be this was a childish thing for some people, but it was bit tough for me initially because of different tutorials & every other tutorial showed different way of doing installation, so i shared my practice with you.
Hope you like it!!!! :)

If you have any query regarding installation or Android, please ask frankly, I'll try my best to provide its solution as much as possible.