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:
- Eclipse
- JDK
(Java Development Kit)
- Android
SDK
- ADT
(Android Development Tools)
1.Installing
the Eclipse:
- Download and install Eclipse IDE latest version or 3.2
or 3.3 or above. Recommended version is “Eclipse IDE for Java
Developers”
Ø
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.
- Install
JDK (Java Development Kit) version 5.0 or 6.0.
Ø
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
- 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
- Download
the latest Android SDK.
- Unzip
to C:\AndroidSDK
- Right-click
on (My) Computer, and select Properties
- Go
to Advanced settings
- XP:
Click the Advanced tab
- Vista/7:
Click Advanced system settings on the left
- Click
the Environment Variables button
- double-click
on Path (under System Variables)
- 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:
- Start
Eclipse, then select Help > Install New Software.
- In
the Available Software dialog, click Add....
- 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.
- 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.
- 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.
- 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:
- Select
Window > Preferences... to open the Preferences panel
(Mac OS X: Eclipse > Preferences).
- Select
Android from the left panel.
- 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:
- Select
Help > Software Updates > Find and Install….
- Select
Search for updates of the currently installed features and press Finish.
- If
any update for ADT is available, select and install.
Alternatively:
- Select
Help > Software Updates > Manage Configuration.
- Navigate
down the tree and select Android Development Tools <version>
Create New Project
- Start Eclipse
- Click on File-> New -> Project
- Select
"Android Project" and click Next.
- 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
- Choose
minimum Android target version.
- 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:
- Select Run > Run.
- Select "Android
Application".
Call Us – (203) 208 3081
Write us – sales@panzertechnologies.com