P. 1
Android Installation Step by Step Procedures

Android Installation Step by Step Procedures

|Views: 136|Likes:
Published by Shubhangi

More info:

Published by: Shubhangi on Mar 28, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

03/28/2011

pdf

text

original

Android Installation Step by Step Procedures

Introduction
To develop an application for any programming language or device, the first thing you will need to do is setup your environment. This involves three pieces of software, an y y y Integrated Development Environment (IDE), Software Development Kit (SDK) and Eclipse plugin.

There are also some other Android specifics you will have to change. So now please follow the 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 to your desktop. http://www.eclipse.org/downloads/ 2. Extract the file, a folder titled eclipse will be created. Drag that folder ton your applications 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 to How 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 if you 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 first time 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 your desktop.

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.

o

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

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

Check this box
o o
Click Save & Apply. 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.

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 selected 2.0.1 because that is currently what the Droid runs, but feel free to select them all. 8. Click Install Selected 9. A pop-up will show asking if you want to accept the downloads, check Accept All and then click Install Accepted 10. 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://dlssl.google.com/android/eclipse/" in Location as shown below.

Add Site
4. Click OK 5. Once Pending... changes to Developer Tools, select that checkbox and click next.

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 application
Before 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.

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. 2. 3. 4. Open Eclipse. Select Window -> Preferences. Select Android from the left. 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.

Preferences
6. 7. 8. 9. Select one of the versions; I chose Android 2.0.1 and click OK. Select File -> New -> Project. Open the Android folder and select Android Project. Click Next. Fill out the form with the following information:Project name: HelloAndroid Application name: Hello, Android Package name: com.example.helloandroid (or your own private namespace) Create Activity: HelloAndroid Min 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.

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 Android application!

Hello, Android screenshot

Congratulations! If you made it this far you have developed your first Android application, from start to finish

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->