IM Android - Development Environment

Embed Size (px)

Citation preview

  • 8/3/2019 IM Android - Development Environment

    1/13

    Android

    Development Environment Setup Document

  • 8/3/2019 IM Android - Development Environment

    2/13

    Index

  • 8/3/2019 IM Android - Development Environment

    3/13

    1. What is Android?

    Android is a software stack for mobile devices that includes an operating system, middle ware andkey applications. The Android SDK provides the tools and APIs necessary to begin developing

    applications on the Android platform using the Java programming language.

  • 8/3/2019 IM Android - Development Environment

    4/13

    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 latestdownload 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 isrecommended). 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/

    http://developer.android.com/sdk/requirements.htmlhttp://java.sun.com/javase/downloads/index.jsphttp://www.eclipse.org/downloads/http://developer.android.com/sdk/requirements.htmlhttp://java.sun.com/javase/downloads/index.jsphttp://www.eclipse.org/downloads/
  • 8/3/2019 IM Android - Development Environment

    5/13

    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 SDKcomponents.

    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 thandownloading 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:

    http://dl.google.com/android/android-sdk_r06-windows.ziphttp://dl.google.com/android/android-sdk_r06-windows.zip
  • 8/3/2019 IM Android - Development Environment

    6/13

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

  • 8/3/2019 IM Android - Development Environment

    7/13

    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 ADTPlugin on this URL)

    http://developer.android.com/sdk/eclipse-adt.html#preparinghttp://developer.android.com/sdk/eclipse-adt.html#preparing
  • 8/3/2019 IM Android - Development Environment

    8/13

    3. Setting up a Android Project from existing location.

    1. Open the Eclipse

    2. 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:

  • 8/3/2019 IM Android - Development Environment

    9/13

    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. Check the Select root directory and click on the browser button.

    4. Select the folder that you had created for the SVN checkout and choose regexp-me. Click on the finish button.

  • 8/3/2019 IM Android - Development Environment

    10/13

    7. Create the Android Virtual Device.

    i. 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:

  • 8/3/2019 IM Android - Development Environment

    11/13

    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/3/2019 IM Android - Development Environment

    12/13

    8. Creating a Launch Configuration

    Before you can run and debug your application in Eclipse, you must create a launch configurationfor 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.

  • 8/3/2019 IM Android - Development Environment

    13/13

    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).