and Install The Android SDK and Test The Emulator
and Install The Android SDK and Test The Emulator
and Install The Android SDK and Test The Emulator
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
2. Install Java
3. Install Eclipse
4. Install the ADT Plugin in Eclipse
5. Create Hello World Application
1. Download and Install the Android SDK and test the Emulator
Create a folder called "android" in the drive C. Goto
http://code.google.com/android/download.html. Click on the android_sdk_windows...
link, download and save it to c:\androi.
1.
Unzip downloaded file.
2
.
3 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,
doubleclick on Path under System Variables. Add the full path to the tools/ directory to the
path, in this case, it is: C:\android\androidsdkwindows1.0_r1\tools. Then click OK , OK , OK.
.
4. Click on Start > All Programms > Accessories > Command prompt and type emulator,
then hit ENTER , in a couple seconds the emulator will appear, please wait when it's
starting up.
Click on Browser button.
5.
Click on the Menu button, then click on Go to ... Type in a website address you want to
view and press ENTER, ex: http://androidcore.com
6.
2. Install Java
Goto http://developers.sun.com/downloads/
1.
Choose Java SE (JDK) 6 link.
2
.
Click on the Download button
3
.
Click on the Download button
4
.
Select Platform, Language for your download, check into the box "I agree to ..." and then
click on the button "Continue"
5.
6 Click on the file name (jdk6u10windowsi586p.exe) to start to download the Java SDK
.
Save it to C:\android
7. After it has finished downloading, you will have this file in your directory (C:\android).
Double click on file that was downloaded to start install Java SDK.
Accept agreement. And click Next to start install.
3. Install Eclipse
Eclipse is a professional editor.
Go to http://www.eclipse.org/downloads/ . Download and save it to drive C:\. The current
version of Eclipse is 3.4.1
1.
After it has finished downloading, you will have this file in your directory (C:\). Unzip this
file.
2.
3 Doubleclick on the file c:\eclipse\eclipse.exe to run Eclipse editor.
Click OK to Continue.
4. Install the ADT Plugin
The ADT (Android Development Tools) plugin includes a variety of powerful extensions that make
creating, running, and debugging Android applications faster and easier.
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
Choose "Available Software" tab, then click on the button "Add Site ..."
2
.
Copy and paste this link into input box "Location": https://dl
ssl.google.com/android/eclipse/, click OK
3.
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 ..."
.
Click on the button Next
5
.
Check the "I accept the terms of the license agreements" and click Finish.
6
.
Wait to Eclipse download the plugin
7.
Eclipse will ask to restart, click on the button Yes
8.
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 World Application
This will show you how to make the first simple Android application with Eclipse.
Click File > New > Other....
1.
Click on Android Project and click Next.
2.
Fill out the form and click Finish.
3.
Change the code in HelloWorld.java to the following.
4
<p>package com.androidcore.hello;
.
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HellWorld extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}</p>
Click on menu Run, choose Run Configurations.
5.
Click on Android Application, fill in Name, Project. Click on the "Launch" choice, choose Activity.
Then click on button Run.
6
.
Once Android Emulator is booted up, your application will appear. When all is said and
done, you should see something like this:
7.
That's it — you're done!