Android Installation Step by Step Procedures

Embed Size (px)

Citation preview

  • 8/7/2019 Android Installation Step by Step Procedures

    1/7

    Android Installation Step by Step Procedures

    IntroductionTo develop an application for any programming language or device, the first thing you willneed to do is setup your environment. This involves three pieces of software, an

    y Integrated Development Environment (IDE),y Software Development Kit (SDK) andy Eclipse plugin.

    There are also some other Android specifics you will have to change. So now please followthe given steps to get your environment up and running on Windows XP.

    Eclipse Installation

    1. Navigate to Eclipse Downloads and download Eclipse IDE for Java EE Developers toyour desktop.

    http://www.eclipse.org/downloads/

    2. Extract the file, a folder titled eclipse will be created. Drag that folder ton yourapplications folder.

    3. Open the folder, and then double-click the application Eclipse, the purple circle.1. Note: If you get an error stating you don't have Java installed, navigate toHow do I install Java? and follow the simple, once click download and install.

    4. When Eclipse is done starting, it will ask you to select a workplace. You can change it ifyou like, but the default location works fine. Click OK.

    5. An introduction splash page will open, feel free to browse around if this is your firsttime with Eclipse. You can close this when you are done.

    Android SDK Installation

    1. Navigate to Android SDK | Android Developers and download the Windows SDK to yourdesktop.

    http://developer.android.com/sdk/index.html#installingplugin

    2. Extract the file, then open the folder. Then open SDK Setup.exe.3. A terminal window will open for a few seconds, and then Android SDK and AVD

    Manager will open.

  • 8/7/2019 Android Installation Step by Step Procedures

    2/7

    o Note: If you get this error message: "Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error.You might want to force download through HTTP in the settings."

    Error message

    o Click Close then click Cancel on the next screen.o Click Settings on the left.o Check Force https://... sources to be fetched using http://

    Check this box

    o Click Save & Apply.o Your sources should refresh, and no error message should display.

    4. Click on Available Packages on the left.5. Click the little plus sign next to the URL.

  • 8/7/2019 Android Installation Step by Step Procedures

    3/7

    Click this plus sign

    6. You will now be presented with a list of available SDKs and APIs.

    Available SDKs and APIs

    7.

    Select the versions (both SDK and API) that you will need for your project. I selected2.0.1 because that is currently what the Droid runs, but feel free to select them all.8. Click Install Selected9. A pop-up will show asking if you want to accept the downloads, check Accept All and

    then click Install Accepted10.The files will begin downloading and might take a while. They will install automatically.11.Once they are finished installing, click Close.12.You may now close SDK Setup.exe.

    Installing ADT Plugin

    1. Open Eclipse.2. Select Help -> Install New Software...3. Click the Add button and enter "Android Plugin" for the name and "https://dl-

    ssl.google.com/android/eclipse/" in Location as shown below.

    Add Site

    4. Click OK5. Once Pending... changes to Developer Tools, select that checkbox and click next.

  • 8/7/2019 Android Installation Step by Step Procedures

    4/7

    Developer Tools

    6. Click Next again.7. Check I accept the terms of the liscense agreements and click Finish.8. If you recieve the Security Warning message, click OK.

    Security Warning

    9. When the Software Updates pop-up displays, click Yes and wait for Eclipse to restart.

    Software Updates

    Writing your first Android applicationBefore diving into any code, you will need to setup your Android Virtual Device (AVD).

    1. Open the android application used before.o If you downloaded the SDK to your Desktop, it will be located in Desktop ->

    android-sdk_r04-windows -> SDK Setup.exe

    2. Click Virtual Devices on the left.

  • 8/7/2019 Android Installation Step by Step Procedures

    5/7

    3. Click New... on the right.4. Give the AVD a name; I used android_2.0.1.5. Select a version number from the Target: drop-down, like so:

    6. Click Create AVD.7. Click OK and close Android SDK and AVD Manager.

    Now you can start the application.

    1. Open Eclipse.2. Select Window -> Preferences.3. Select Android from the left.4. Click Browse and navigate where you originally extracted the SDK download (I chose

    the Desktop earlier).5. Click Apply. You should see a list of all the SDKs you installed show up.

  • 8/7/2019 Android Installation Step by Step Procedures

    6/7

    Preferences

    6. Select one of the versions; I chose Android 2.0.1 and click OK.7. Select File -> New -> Project.8. Open the Android folder and select Android Project. Click Next.9. Fill out the form with the following information:Project name: HelloAndroid

    Application name: Hello, AndroidPackage name: com.example.helloandroid (or your own private namespace)Create Activity: HelloAndroidMin SDK Version: 2

    10.Select a Build Target, the same as before.

    New Android Project

    11.Click Finish.12.Eclipse will generate a lot of files for a basic Android project.

  • 8/7/2019 Android Installation Step by Step Procedures

    7/7

    Eclipse Generated Files

    13.To run your project, right-click the HelloAndroid project folder and select Run As ->Android Application.

    14.If all goes well, you should the emulator will open and you will see your first Androidapplication!

    Hello, Android screenshot

    Congratulations! If you made it this far you have developed your first Android application,

    from start to finish