Sunday, August 19, 2012

Step-by-Step Android setup.

Hi guys,

This is just the basic start up session. Following are the steps to setup Android environment in your computer.

System Requirements:

To start with, let's check if your system is eligible to setup the environment or not.

  • Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
  • Mac OS X 10.5.8 or later (x86 only)
  • Linux (tested on Ubuntu Linux, Lucid Lynx)
    • GNU C Library (glibc) 2.7 or later is required.
    • On Ubuntu Linux, version 8.04 or later is required.
    • 64-bit distributions must be capable of running 32-bit applications.
If you have at least one of the above then BINGO! you can start with the installation process below.

Installation Process:


To start with Android development, you need to install the following:


  1. Latest JDK. Please select a suitable one from here. JRE alone is not sufficient.
  2. Download the android SDK from here.
  3. From the list of platforms on right side, choose the suitable one and download the ECLIPSE environment. We will be using Eclipse environment to write our code.

Installing ADT


To configure Eclipse for Android development, we need to install the ADT.

  1. Start Eclipse, then select Help > Install New Software.
  2. Click Add, in the top-right corner.
  3. 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/
  4. Click OK.
    Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" ('https' is preferred for security reasons).
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish.
    If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
  8. When the installation completes, restart Eclipse.
If you have any problem in the above process:

  1. Download ZIP format of the ADT plugin (ADT-20.0.3.zip) from here. Do not un-zip it.
  2. Start Eclipse, then select Help > Install New Software.
  3. Click Add, in the top-right corner.
  4. In the Add Repository dialog, click Archive.
  5. Select the downloaded ADT-20.0.3.zip file and click OK.
  6. Enter "ADT Plugin" for the name and click OK.
  7. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  8. In the next window, you'll see a list of the tools to be downloaded. Click Next.
  9. Read and accept the license agreements, then click Finish. (If you get any security warning, just hit "OK").
  10. When the installation completes, restart Eclipse.


Configure ADT:

After you have installed the ADT, after Eclipse re-starts, you now need to specify the location of Android SDK directory. 

  1. Select Window > Preferences... to open the Preferences panel (on Mac OS X, select Eclipse > Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse... and locate your downloaded Android SDK directory (which would be some thing like "android-sdk-windows").
  4. Click Apply, then OK.

Updating ADT:

  1. Select Help > Check for Updates. If you have installed the latest plug-in, you will get a dialog box and you are done.
  2. If there are updates available, select Android DDMS, Android Development Tools, and Android Hierarchy Viewer, then click Next.
  3. In the Update Details dialog, click Next.
  4. Read and accept the license agreement and then click Finish. This will download and install the latest version of Android DDMS and Android Development Tools.
  5. Restart Eclipse.
You have now successfully completed setting up the Android environment!!! 

You can now start your first android project by referring to this code.


UPDATE:

You can update the ADT using the SDK Manager.
Under the "Sort By" select API Level.
In the list of available, installed, obsolete packages, under TOOLS check Android SDK Tools and Android SDK Platform-Tools and Install Packages...
You will now have the latest ADT installed. After updating the ADT, you can update the latest JellyBeans version(4.2)!!!


The android developer site is the best guide for beginners.

No comments:

Post a Comment