Friday 25 April 2014

How To install Android environment | Android Developer Hyderabad


How To install Android environment:
Here’s a quick start installation guide to get you up and running with the Google Android Software Development Kit (SDK). This guide will describe how to install the Android SDK and set up your chosen development environments. If you’ haven’t already done so you can download the Android SDK from the link below, then we can get started.
First you’ll need to download the Android SDK source files:
( http://code.google.com/android/download.html )
System Requirements
In order to first use the Android SDK code and tools for development you will of course need a suitable environment develop from.
Currently the following operating systems are supported:
  • Windows XP or Vista
  • Mac OS X 10.4.8 or later (x86 only)
  • Linux (tested on Linux Ubuntu Dapper Drake)
You will also need to install a suitable development environment such as:
  1. Eclipse
  2. JDK (Java Development Kit)
  3. Android SDK
  4. ADT (Android Development Tools)



1.Installing the Eclipse:
  1. Download and install Eclipse IDE latest version or 3.2 or 3.3 or above. Recommended version is “Eclipse IDE for Java Developers”
                                  http://www.eclipse.org/downloads/.
Ø  For Windows, The Eclipse download comes as a big ZIP file that you install by extracting the files to your favorite directory. We’ll assume that you extracted to C:/eclipse.
Ø  For Mac OS X, The Eclipse download comes as a big tar ball (.gz file) that you install by extracting             the files to your favorite directory. we'll assume that you extracted to /usr/lib/eclipse.
2.Installing the JDK:
  1. Install JDK (Java Development Kit) version 5.0 or 6.0.


Ø  For Windows, you can go to http://java.sun.com/javase/downloads and choose JDK 6 Update.

Ø  In Mac OS X, we don't need to do this as JDK (5.) is built-in installed with Mac OS X.
3.Installing the Android SDK
First you will need to download the Android SDK pack .zip archive, once downloaded find a suitable installation location on your machine and extract the zipped files.
Mac OS X
  1. In the home directory locate the .bash_profile and locating the PATH variable add the location to your $SDK_ROOT/tools folder.
Windows XP / Vista
  1. Download the latest Android SDK.
  2. Unzip to C:\AndroidSDK
  3. Right-click on (My) Computer, and select Properties
  4. Go to Advanced settings
    • XP: Click the Advanced tab
    • Vista/7: Click Advanced system settings on the left
  5. Click the Environment Variables button
  6. double-click on Path (under System Variables)
  7. Add the full path to the tools/ directory:
C:\AndroidSDK\tools\
(Make sure a semicolon (;) separates this new path from all the others)
The Android SDK also requires a suitable development environment to work in, here’s the installation guides for each of the supported environments.

4.Installing the ADT Plugin:

  1. Start Eclipse, then select Help > Install New Software.
  2. In the Available Software dialog, click Add....
  3. In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.
In the "Location" field, enter this URL:
Note: If you have trouble acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).
Click OK.
  1. Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.
  2. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish.
  3. Restart Eclipse.
Configuring the ADT Plugin:
Once you've successfully downnloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:
  1. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.   Click Apply, then OK.
Updating the ADT Plugin
To update the ADT plugin to the latest version, follow these steps:
  1. Select Help > Software Updates > Find and Install….
  2. Select Search for updates of the currently installed features and press Finish.
  3. If any update for ADT is available, select and install.
Alternatively:
  1. Select Help > Software Updates > Manage Configuration.
  2. Navigate down the tree and select Android Development Tools <version>
Create New Project
  1. Start Eclipse
  2. Click on File-> New -> Project
  3. Select "Android Project" and click Next.
  4. Fill in the project details with the following values:
1.    Project name: HelloAndroid
2.    Application name: Hello, Android
3.    Package name: com.example.helloandroid (or your own private namespace)
4.    Create Activity: HelloAndroid
  1. Choose minimum Android target version.
  2. Click Finish project.

Your Android project is now ready. It should be visible in the Package Explorer on the left. Open the HelloAndroid.java file, located inside HelloAndroid > src > com.example.helloandroid). It should look like this:
package com.example.helloandroid;



import android.app.Activity;

import android.os.Bundle;



public class HelloAndroid extends Activity {

    /** Called when the activity is first created. */

    @Override

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);

    }

}

Run the Application

The Eclipse plugin makes it easy to run your applications:
  1. Select Run > Run.
  2. Select "Android Application".
Call Us – (203) 208 3081
Write us – sales@panzertechnologies.com





No comments:

Post a Comment