Vous êtes sur la page 1sur 13

Android Development Environment Setup Document

Index

1.

What is Android?

Android is a software stack for mobile devices that includes an operating system, middle ware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.

2.

Installing Pre-requisites, Android SDK Starter Package and ADT Plugin for Eclipse

Step 1. Pre-requisites 1. System Requirements Go to the following link to check the system requirements: http://developer.android.com/sdk/requirements.html 2. JDK installation JDK 1.6 should be installed. You may visit the following URL for latest download of JDK: http://java.sun.com/javase/downloads/index.jsp 3. Eclipse If you will be developing in Eclipse with the Android Development Tools (ADT) Plugin, make sure that you have a suitable version of Eclipse installed on your computer (3.4 or newer is recommended). A Java or RCP version of Eclipse is recommended. For Eclipse 3.5, the "Eclipse Classic" version is recommended. To download and install Eclipse, go to the following URL: http://www.eclipse.org/downloads/

Step 2. Installing Android SDK Starter Package 1. Download Android SDK Started Package The first step in setting up your environment for developing Android applications is downloading the Android SDK starter package. The starter package is not a full development environment it includes only the core SDK Tools, which you can use to download the rest of the SDK components. Download the starter package using the following link: http://dl.google.com/android/android-sdk_r06-windows.zip Note - If you are already using the Android SDK and would like to update to the latest tools or platforms, please use the Android SDK and AVD Manager to get the components, rather than downloading a new SDK package. 2. Create a directory android in C: or D: drive. 3. Unzip the downloaded zip file in android directory.

4. Run the SDK Setup.exe file. This file will be at location C:\android\android-sdk-windows.
Following screen will appear: The following screen will appear in front of you

5. Packages section on the left will show you all the available packages. To select all the packages
click on the Accept All radio button, and then the click on Install button. 6. After installation of all the packages the following screen will appear:

The above screen shows all the installed package. Close the window.

Step 3. Installing the ADT Plugin for Eclipse This section describes how to install the Android Development Tools (ADT) plugin and set up Eclipse (Eclipse 3.4 (Ganymede) , Eclipse 3.5 (Galileo) ). Refer the following link for steps: http://developer.android.com/sdk/eclipse-adt.html#preparing (Note: Follow steps under sections Downloading the ADT Plugin and Configuring the ADT Plugin on this URL)

3. 1. 2.

Setting up a Android Project from existing location. Open the Eclipse Choose the workspace (C:\android\workspace).

3. Click on the File menu.


4. Go To File > New > Project. You will see the following screen:

5.

Select Android Project and click on Next. Enter the information as shown below:

6.

Import the regexp-me in the project. 1. Click on File menu, select the import. The following screen will appear.

2.

Click on the General, select the Existing Projects into workspace and click on the Next. The following screen will appear.

3. 4.

Check the Select root directory and click on the browser button. Select the folder that you had created for the SVN checkout and choose regexpme. Click on the finish button.

7. i.

Create the Android Virtual Device. Right Click the project

ii. Choose the Run As > Android Application. Following screen will appear.

iii. Click on the New Button. Following screen will appear.

iv. Provide the following:

Name Android DemoEmulator Target Version of Android SDK you downloaded. SD Card related details.

v. Click on Create AVD button. The following screen will appear

8.

Creating a Launch Configuration

Before you can run and debug your application in Eclipse, you must create a launch configuration for it. A launch configuration specifies the project to launch, the Activity to start, the emulator options to use, and so on. To create a launch configuration for the application, follow these steps as appropriate for your Eclipse version: i. Open the launch configuration manager. In Eclipse 3.3 (Europa), select Run > Open Run Dialog... or Run > Open Debug Dialog... as appropriate. In Eclipse 3.4 (Galileo), select Run > Run Configurations... or Run > Debug Configurations... as appropriate.

ii. In the project type list on the left, locate the Android Application item and double-click it
(or right-click > New), to create a new launch configuration. iii. Enter a name for your configuration. iv. On the Android tab, browse for the project and Activity to start.

v. On the Target tab, set the desired screen and network properties, as well as any other
emulator startup options. vi. You can set additional options on the Common tab as desired. vii. Press Apply to save the launch configuration, or press Run or Debug (as appropriate).

Vous aimerez peut-être aussi