how to install the android sdk on windows xp with cell phone emulator

Upload: vaibhav-sharma

Post on 06-Apr-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    1/40

    How to Install the Android SDK on

    Windows XP and Create an Application

    that Runs in the Cell Phone EmulatorThis tutorial shows you how to download and install Android to

    get you started developing applications for it.

    This workshop has a screenshot and comment box on each step.

    You can post without registering. Good luck!

    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

    We will first go to the Android site and download the SDK

    1.Goto code.google.com/android/download.html and click on the

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    2/40

    2.Unzip the SDK where you downloaded it.

    post comment or question

    3.Copy all unzipped files to c:\android.

    post comment or question

    4.

    Set your PATH environment variable by doing this: start > settings > c

    panel > system >advanced > environmental variables , in the System Var

    the Edit button, then go to the end of you PATH variable, and type ;cclick OK , OK , OK .

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    3/40

    post comment or question

    5.Click on start > programms > accessories > command prompt and type

    a couple seconds the emulator will appear, leave the check checked a

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    4/40

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    5/40

    aaronferrucci: If your computer is old/slow, it may take a while for the emulator to cwhile you wait.

    reply

    Joe: In my command prompt, I get an error message "Cannot create data directory: ....

    directory with -datadir. Any help?

    Jeff: I was able to get it working by specifying a directory via -datadir I used c Paul: Me too... I created them manually, which allowed the emulator to start, band won't do anything else...

    David: Paul I have the exact same thing, any work arounds?

    Girish: I created a temp dir. But still tat doesnot work

    Girish: it says "A N D R O I D " and and i cant use anything else...

    Jim: I did this as well it got to the "A N D R O I D" part. I had to wait about 1

    NAF: I got the same 'ANDROID' display. But after waiting a while, my app fin

    1,8GHz). Maybe just be a little patient, it takes some time.Jess: I'm still not sure how you create them manually could i get someone to ex

    jess: I mean I got c:\android\tools but i still don't know where to go from there Hamed: for the error in command prompt ""Cannot create data directory: .... pwith -datadir." I created the directories mentioned in the path above this error m

    for me was like this: "C:\Documents and Settings\Administrator\Local SettingsData\Android\SDK-1.0" then u just need to go to MyComputer and follow this

    Settings\Administrator\Local Settings\Application Data\" then there creat the nAndroid folder and creat the new folder "SDK-1.0" . then just go to command p

    worked for me like this and the Android Emulator appeared on the screen. but menu appear after android logo. hope this helps :)

    sikus: I did in folder "SDK-1.0" .bat file and there I wrote "-datadir C:\android

    unzip SDK for Android.

    reply

    PW: Jess: Create them manually in the command prompt by typing the following: C:\

    c:\android\tempreply

    post comment or question

    6.Click on the browser button.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    6/40

    post comment or question

    7.Click on the "quick links" icon and press a .

    post comment or question

    8.Type in a website address you want to view and press ENTER .

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    7/40

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    8/40

    post comment or question

    Go to the next section:

    2. Install Java

    2. Install Java

    To run Eclipse we first need Java so we will download and install it now.

    1.Goto developers.sun.com/downloads.

    Stone Deft: At this point apache mysql and phpmyadmin is already installed and you

    use dreamweaver or other php editors other than eclipse

    reply

    post comment or question

    2.Click on the Java SE (JDK) 6 link.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    9/40

    uninstall: I have 2 java programs running and I can't uninstall one of them because it

    installing it

    replyJoel: I'm pretty sure you only need a JRE to run Eclipse, not the full JDK.

    BitJunky: JDK 5 or JDK 6 (JRE alone is not sufficient) http://code.google.co reply

    post comment or question

    3.Click on the Download button for JDK 6u1.

    krisavi: I clicked it and it gives me that download server is down, where I can downl

    Edward: I just tried it and got "Notice: We're Offline for System Upgrades" a

    again.

    reply

    Ward Christensen: Only offers 6u2 07/08/07. 6u1 SDK EE stilll there. I'm going to

    how up-to-date all the comments so far have been!) This is WONDERFUL!

    reply

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    10/40

    Johnny: I can't find any 6u1 or 2 there.

    student: i did the 6u4 one

    himanshu: JDK 6 Update 6 is the latest. sincerely, Himanshu.

    Hamed: if it has the explanation which says : "The Java SE Development Kit Runtime Environment (JRE) and command-line development tools that are us

    applications." thats enough. for example i downloaded the Java SE Developm

    reply

    lini: i cant find jdk 6u1

    reply

    steve: jdk-6u7-windows-i586-p.exe #sept-27th-08#

    reply

    Qn: JDK 6u7 the newest one.

    reply

    AH: i cant find jdk 6u1 either. reply

    post comment or question

    4.Click Accept.

    post comment or question

    5.Click on Windows Offline Installation, Multi-language.

    Chill: This is the message i get when i try to download it, "There are no 64-bit versioStart or Java Control Panel; however the 32-bit versions of the JRE can be installed o

    obtain this functionality. Note that only 32-bit browsers are supported at this time." W

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    11/40

    post comment or question

    6.Click OK to save it to disk.

    post comment or question

    7.Save it to C:\download\java6.

    Johnny: You make a your own folder first right?

    Edward: Right, the main thing is that you just download it somewhere and ex

    reply

    post comment or question

    8.Wait a couple minutes.

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    12/40

    9.After it has finished downloading, you will have this file in your direct

    post comment or question

    10.Double click on file that was downloaded.

    Michael: I clicked it and I got 'To Restart Installer, Please Refresh The Webpage'

    reply

    Samantha: I also have the same problem.. reply

    post comment or question

    11.Accept agreement.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    13/40

    post comment or question

    12.

    Click Next and it will install for about 8 minutes.

    post comment or question

    13.Unclick the Show the readme file checkbox and click Finish.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    14/40

    post comment or question

    3. Install Eclipse

    Eclipse is a professional editor normally used for Java. We willinstall it in this step and then install the PHPEclipse plugin so wecan use it with PHP.

    1.Goto www.eclipse.org/downloads and click Eclipse IDE forJavaDev

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    15/40

    KarlK: Hmmm... If I have Eclipse installed, having followed the PHP Quick Install

    totally separate android (Java-based) development environment? The bundled packagcombined/hybrid eclipse installs.

    Edward: Theoretically you could have one eclipse and just switch the perspec

    my experience is that conflicts occur. The great thing about eclipse is it is not ust have a c:\eclipsePhp and a c:\eclipseAndroid and start the one you need, a

    at the same time, a nice feature.

    reply

    remish: i have already eclipse with me, only i want to add the android plugins but it iresolve it? reply

    post comment or question

    2.

    Click on the suggested mirror link.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    16/40

    post comment or question

    3.Click "Save to Disk" and click on OK .

    post comment or question

    4.Unzip the Eclipse file that you downloaded.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    17/40

    post comment or question

    5.Type in c:\ and click OK (this will create a directory called c:\eclipse

    there.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    18/40

    post comment or question

    6.Double-click on the file c:\eclipse\eclipse.exe.

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    19/40

    7.Set the workspace to C:\androidApps , click the checkbox, then click

    post comment or question

    8.Click on the workbench icon.

    Himanshu: Why this step may I ask ? You just tell to click here and then next step sa Jo: think about it

    reply

    russell adkins: Maybe to make sure it works?reply

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    20/40

    9.Close Eclipse by clicking on the X.

    post comment or question

    10.

    Click the checkbox and OK .

    post comment or question

    Go to the next section:

    4. Install the ADT Plugin in Eclipse

    This plug-in (Android Development Tools) will make creating applications forAndroid easier so we will install it now.

    1.Start Eclipse and then click Help > Software Updates > Find and Install.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    21/40

    Thakgatso: i dont have the "Find and intall.." option. I only have the Software Updat

    reply

    Tapan: Even I don't see "Find and install" option. I only have the "Software UpdatesEclipse version 3.4 and installed. reply

    Clement: The sub menus under Software Updates no longer shows Click on the avail

    add site Add: https://dl-ssl.google.com/android/eclipse You will see the two packages

    Skipper: I get an error saying: No repository found at https://dl-ssl.google.com

    Skipper: fixed, just had to use "http" instead of "https"

    replypost comment or question

    2.Click the Search fornew features toinstall choice and then click Next.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    22/40

    post comment or question

    3.Click the New Remote Site... button.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    23/40

    post comment or question

    4.In the Name box type Android Plugin and in the URL box type https://dl-

    ssl.google.com/android/eclipse, then click OK .

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    24/40

    filbert: In Eclipse it results in the following error: No repository found at https://dl-ssa browser it results in a 404. Changing to http:// makes no difference.

    reply

    post comment or question

    5.Make sure Android Plugin choice is checked and click Finish.

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    25/40

    6.Check the Android Pluging choice again and click Next.

    Santhosh: After clicking on Next,i am getting an pop-up saying IO EXception.PLeasexception. reply

    remish: when i am selecting the checkbox its showing the error "Current configuratio

    this.reply

    post comment or question

    7.Check the I accept the terms in the license agreement choice and click Ne

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    26/40

    post comment or question

    8.Click Finish.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    27/40

    post comment or question

    9.Click Install All .

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    28/40

    post comment or question

    10.Click Yes to restart Eclipse.

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    29/40

    11.When Eclipse starts again, click Window > Preferences....

    Joel: The default font size really is fine if you're using a modern, high-res, monitor. If

    see why you'd want smaller characters though.

    reply

    indeed: this should perhaps been marked as optional? at 1920x1200 this will give me

    post comment or question

    12.Click Android then OK .

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    30/40

    Francis Cagney: I've followed all these steps exactly to here, but at this point no andleft. If I try and re download android adt it say its already there. Below are the only taInstall/Update Run/Debug Team

    Francis Cagney: Actually I've solved it. I was download Ecliple for C++ inst

    Surprised some part of the Eclipse/android interaction dind't point out what waTanguay for writing a superb tutorial. Gonna enter the google competition?

    Omar: Yeah Edward. Would like to know if you are planning to take part in t reply

    selva: I dont get android preference on the left . someone please help me.

    yogesh: I am getting the error when i enter path of tools for android. C:\androi

    [2008-03-17 01:51:40 - adb] Failed to get the adb version: Cannot run programerror=3, The system cannot find the path specified [2008-03-17 01:52:21 - adb

    it now * Also i have observed that i am not getting check box automatic sync [email protected] . I am going to start working on a project on andoid.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    31/40

    reply

    post comment or question

    13.Click Browse... then navigate to c:\android and click OK .

    post comment or question

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    32/40

    14.Click Apply and then OK .

    post comment or question

    5. Create Hello World ApplicationThis will show you how to make a simple application with Eclipse.

    1.Click File > New > Other....

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    33/40

    post comment or question

    2.Click on Android Project and Next.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    34/40

    post comment or question

    3.Fill out the form and click Finish.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    35/40

    post comment or question

    4.Change the code in HelloWorld.java to the following.

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    36/40

    pcor59: Hallo, with last SDK I had to modify java source with 2 import: import android.android.widget.TabTextView; and I had to replace TextView with TabTextView. All wo

    your great Tutorial, all the best and have a nice 2008.

    Andy: Hi pcor59, I'm using the latest SDK. How do I modify java source with the reply

    Andy: Hi Edward! You site had very good tutorials! I'm using the latest SDK and I'm ge"TextView cannot be resolved to a type" pointing to line 10 of the code. I'm excited to se

    Appreciate your help!

    Rod: I hope this isn't posted too late but I got the same error. The solution I accidthe following under 'import android.app.Activity; ... import android.os.Bundle; im

    This solved my problem... :-\

    reply

    Ronen: i just read on the notepad tutorial , that pressing ctrl+shift+o can automatically adit here and it worked. so instead of writing import line you can press those keys. reply

    post comment or question

    5.Click Run > Open Run Dialog....

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    37/40

    post comment or question

    6.Click on AndroidApplication, then on the add icon, fill in Name, Project an

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    38/40

    post comment or question

    7.In about 20 seconds you will see your application appear in the emulato

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    39/40

  • 8/3/2019 How to Install the Android SDK on Windows XP With Cell Phone Emulator

    40/40

    KenR: Excellent tutorial. Thank you so much for making everything so easy to get starte

    Harpreet: Great tutorial to start , havent seen better than this

    reply

    Gaurav: Excellent Tutorial....All Done in really easy steps... :) reply

    LC: Excellent, yes! verry easy! Now, since I am a greenie at this, please point me towardI just did??? I get the emulator, not sure about eclipse and what it means to create applica

    judy: Superb Tutorial. reply

    Vishal Singh: Awesome tutorial. But emulator is old. reply

    ekambresh: Excellent tutorial i was facing lots of problem while installing eclipse with aa lot.it will be better post some tutorial regarding android. reply

    Hebs: Hey thanks for this tutorial. I tried all week to get the sdk working in Ubuntu 7.10

    dependency errors when installing the ADT plugin in Eclipse. I guess this is one more thWindblows for: / reply

    Rod: Amazing... I followed through and this worked! I am so happy I didn't crash and busunny: very well put together and worked perfectly reply

    mrbahl: Hello, Amazing tutorial Sir ! Good job.. you deserve a letter of thanks from the ) reply

    Thakgatso: Thanks for this tutorial, it helped me a lot. I dont seem to get the 4th step rig

    the android SDK from the Help>>Install updates reply

    siddharth khimsara: a very good and easy to-the-point tutorial...hats off!! reply

    Justin: Spot on - installation a bit dated, used this from Google http://code.google.com/athen followed the Hello World tutroial here and it worked fine. Thanks very much! reply

    Doctor

    :Great tutorial. Really helped me. reply

    Mukaram: Thanks. Got me started in no time. reply

    raykin: Thanks, very good tutorial. Saved me a lot of time. reply

    Hamed: a really great and usefull step by step tutorial! tnx so much, keep it up :) reply

    post comment or question