Home and Blog button

Pages

Introduction

Welcome To my Blog !!
This is a blog where you can get some knowledge that i have learned and been using. Sharing is gaining pals. So Happy Sharing and don't forget to follow and link my blog with yours! Thanks.
Happy Programming!!

Sunday, August 21, 2011

How to Setup Android Development Environment? Part 1 (Windows)

Android Smartphone is one of the most competitive mobile platforms which come after the Apple’s iOS in mobile market share. So, it would be very good choice to develop for Android platform. If you want to know what is about Android, please see this post by me. In this post I am going to write about setting up the Android Development Environment in your Computer.

The Android SDK is pretty flexible and integrates well with a couple of development environments. Some might choose to go all hard-core with command-line tools. But I want things to be a little bit more comfortable, though, so I’ll go for the simpler, more visual route using an IDE (integrated development environment). Here’s the grocery list of software that needs to downloaded and installed in the given order:
  1. The Java Development Kit (JDK), version 5 or 6. Going for 6 is preferred.
  2. The Android Software Development Kit (Android SDK).
  3. Eclipse for Java Developers, version 3.4 or 3.5.
  4. The Android Development Tools (ADT) plug-in for Eclipse.
Let’s go through steps required to set everything up properly.




Step 1: Setting Up the JDK

Download the JDK with one of the specified versions for your operating system. On most systems it comes in the form of an installer or package, so there shouldn’t be any hurdles. Once the JDK is installed, it is advisable to add a new environment variable called JDK_HOME pointing to the root directory of the JDK installation. Additionally, it is better to add the $JDK_HOME/bin (%JDK_HOME%\bin on Windows) directory to your PATH environment variable.

Step 2: Setting Up the Android SDK

The Android SDK is also available for the three mainstream desktop operating systems. Choose the one fitting for your platform and download it. The SDK comes in the form of a ZIP or tar gzip file. Just uncompress it to a convenient folder (e.g., c:\android-sdk on Windows or /opt/android-sdk on Linux). The SDK comes with a couple of command-line utilities located in the tools/ folder. Create an environment variable called ANDROID_HOME pointing to the root directory of the SDK installation and add $ANDROID_HOME/tools (%ANDROID_HOME%\tools on Windows) to your PATH environment variable. This way you can easily invoke the command-line tools from a shell later on if the need arises.

After performing the preceding steps, you’ll have bare-bones installation that consists of the basic command-line tools needed to create, compile, and deploy Android projects, as well as the SDK and AVD manager, a tool for installing SDK components and creating virtual devices used by the emulator. These tools alone are not sufficient to start developing, so you need to install additional components. That’s where the SDK and AVD manager comes in. The manager is a package manager, much like the package management tools you find on Linux. The manager allows you to install the following types of components:

Android platforms: For every official Android release there’s a platform component for the SDK that includes the runtime libraries, a system image used by the emulator, and any version-specific tools. SDK add-ons: Add-ons are usually external libraries and tools that are not specific to a platform. Some examples of these are the Google APIs that allows you to integrate Google maps in your application.

USB driver for Windows: These are necessary for running and debugging your application on a physical device on Windows. On Mac OS X and Linux you don’t need a special driver.

Samples: For each platform there’s also a set of platform-specific samples. These are great resources for seeing how to achieve specific goals with the Android runtime library.

Documentation: This is a local copy of the documentation for the latest Android framework API. Being the greedy developers we are, we want to install all of these components to have the full set of functionality at our disposal. For this, we first have to start the SDK and AVD manager. On Windows there’s an executable called SDK manager.exe in the root directory of the SDK. On Linux and Mac OS X you simply start the script android in the tools directory of the SDK.

Upon first startup, the SDK and AVD manager will connect to the package server and fetch a list of available packages. It will then present you with the dialog in Figure 1, which allows you to install individual packages. Simply check Accept All, click the Install button, and make yourself a nice cup of tea or coffee. The manager will take a while to install all the packages.


Figure 1: First contact with the SDK and AVD manager

You can use the SDK and AVD manager at any time to update components or install new ones. The manager is also used to create new AVDs, which will be necessary later on when we start running and debugging our applications on the emulator. Once the installation process is finished, we can move on to the next step in setting up our development environment.

For next step please go through How to Setup Android Development Environment? Part 2 . Thanks and Happy Sharing!


10 comments:

  1. Here's one more link that i've found step by step:
    http://emptyharddisk.wordpress.com/category/software-programming/mobile-development/android/

    ReplyDelete
  2. I have no words for this great post such a awe-some information i got gathered. Thanks to Author.

    ReplyDelete
  3. This is directly copied from the book Beginning Android Games by Mario Zechner. Shame on you.

    ReplyDelete
    Replies
    1. Knowledge you share is always comes from certain source. I am glad that you read that book. But I am afraid, this post is not from the book you mentioned. I have never read that book. This post is not for them who already read it somewhere but for them who don't have time to read book or go through each pages to get knowledge. I would better return back the shame you posted to me. I guess you have lot of negativity inside you. If i have copied the same, it has helped some people and I am glad for that.

      Delete
    2. actually, it is indeed from that book, don't know why you say it isn't.

      Delete
  4. Nice information on Android Development and Rize is on of the off shore Development company.

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. You can have a look at the following site for downloading and installing Full Android SDK. There is no need to install Eclipse and Android Development Tools separately. You will get link to the android tutorials from there
    http://android-helper4u.blogspot.in/2013/01/how-to-download-and-install-android.html

    ReplyDelete
  7. Nice post Rajan! Thanks for your clear explanation.. I found this http://androidtechstuffs.blogspot.in/2012/12/configure-android-on-pc.html also useful. Have a look, might help you..

    ReplyDelete

Search This Blog