Monday, May 30, 2011

How to Install the Android SDK on Windows XP

To Install the Android SDK on Windows XP and Create an Application that Runs in the Android Emulator

 This tutorial shows you how to download and install Android SDK to get you started developing Android applications.


1.Download and Install the Android SDK and test the Emulator
Create a folder called "android" in the drive C.
Click on the android_sdk_windows... link, download and save it to c:\androi.



MAC OS X(intel)                     


2.  Install Java
Unzip downloaded file.

Now, set your PATH environment variable by right click on My Computer,
and select Properties.
Under the Advanced tab,
hit the Environment Variables button,
and in the dialog that comes up,
double-click on Path under System Variables.
 Add the full path to the tools/ directory to the path, in this case,
it is: C:\android\android-sdk-windows-1.0_r1\tools. Then click OK , OK , OK.

3.     Install Ellipse
Eclipse is a professional editor.
Step 1:

Download and save it to drive C:\. The current version of Eclipse is 3.4.1
Step 2:
After it has finished downloading, you will have this file in your directory (C:\). Unzip this file.
Step 3:  Double-click on the file c:\eclipse\eclipse.exe to run Eclipse editor.
Click OK to Continue.
Step 4:  select a workspace for workspace launcher
Workspace: C:\Documents and Settings\Ngo Van Luyen\workspace

4.     Install the ADT Plug in in Ellipse
The ADT (Android Development Tools) plugin includes a variety of powerful extensions that make creating, running, and debugging Android applications faster and easier.
 Step 1:
Start Eclipse.
If you are using a proxy, please go to Windows > Preferences > General > Network Connections, choose "Manual proxy configuration" and type your proxy address here. If you are using a direct internet connection, you do not need to do this step.
Click Help > Software Updates
Step 2: Choose "Available Software" tab, then click on the button "Add Site ..."

Step 3:  Copy and paste this link into input box "Location":, click OK
Step 4:  Back in the Available Software view, you should see the plugin. "Android Developer Tools", and "Android Editors" should both be checked. The Android Editors feature is optional, but recommended. Then click on the button "Install ..."
Step 5:  Click on the button Next
Step 6:   Check the "I accept the terms of the license agreements" and click Finish.
Step 7 :    Wait to Eclipse download the plugin
Step 8 :    Eclipse will ask to restart, click on the button Yes
Step 9 :    After restart, update your Eclipse preferences to point to the SDK directory:

1. Select Window > Preferences... to open the Preferences panel.
2. Select Android from the left panel. If you get a dialog says:
"Could not find folder 'tool' inside SDK ...", just click on the button OK

3. For the SDK Location in the main panel, click Browse... and locate the SDK directory.
4. Click Apply, then OK.


5.     Create hello word application

Step 1 :This will show you how to make the first simple Android application with Eclipse.
In C/C++ - Eclipse Platform
Click File > New > Other....
Step 2 :  Click on Android Project and click Next.

Step 3 :  Fill out the form and click Finish.

Step 4 :  Change the code in to the following.
Step 5 :  Click on menu Run, choose Run Configurations.
Step 6:  Click on Android Application, fill in Name, Project. Click on the "Launch" choice, choose Activity. Then click on button Run.
Step 7:  Once Android Emulator is booted up, your application will appear.
That's it — you're done!

<p>package com.androidcore.hello;
  import android.os.Bundle;
  import android.widget.TextView;
 public class HellWorld extends Activity {
    /** Called when the activity is first created. */
   public void onCreate(Bundle savedInstanceState) {
    TextView tv = new TextView(this);
    tv.setText("Hello, Android");

No comments:

Post a Comment