10
1 Islamic University of Gaza Faculty of Engineering Computer Engineering Department Mobile Computing ECOM 5341 By Eng. Wafaa Audah June 2013

Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

1

Islamic University of Gaza

Faculty of Engineering

Computer Engineering Department

Mobile Computing ECOM 5341

By

Eng. Wafaa Audah

June 2013

Page 2: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

2

Setting Up the Development

Environment and Emulator

Part 1: Installation

Step 1 : Install JAVA JDK (Java Development Toolkit)

You can download JDK from here: (Notice your OS 64bit (x64) or 32bit (x86))

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

(Latest update is available)

After installing JDK (here: work is at jdk1.7.0 update 11):

1. Right-click My Computer.

2. Click Properties.

3. Click Advanced System Settings.

4. Click the Environment Variables button.

5. In user variables click new and fill it like this:

6. Repeat step 5 again but with the following variable name, value:

Page 3: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

3

Note: Easy way to get the needed path can be done like this:

Go To Path: Click Right (on the upper bar) - Copy Address

Step 2 : Install Android SDK (ADT Bundle)

You can download SDK from here: (Notice your OS 64bit (x64) or 32bit (x86))

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

- You will get “ adt-bundle-windows-x86-20130514 “ zip folder for 32bit OS. - Installation will be done by unpacking the zip folder. - Resultant folder contains three items which are as the following:

1. eclipse 2. sdk 3. SDK Manager

(All the specifications of these items and other tools will be shown later)

Step 3 : Eclipse

- Open “eclipse” folder and launch “eclipse” (Type: application).

Main window will appear like

this

Page 4: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

4

Step 4 : Prepare AVD (Android Virtual Device)

AVD is a simple tool that used to create Android emulator which represents the virtual

machine for a mobile device that enables the user to run his programs and to see his

results by very simple and friendly way. AVD will be created and edited by AVD Manager

Let’s start!

- Select Window >> Android Virtual Device Manager.

- Click New button. - AVD creation form will appear, fill it as the figure in the following page shows.

Notes:

- In the lab, we will use Android 4.2.2 Jelly Bean (API level 17) version.

- With AVD Manager, we can use any existent device with its own features as we need, or we can create our own device with needed features.

- Generally used device is 4.0 WVGA (400*800) screen resolution.

Page 5: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

5

Directional pad (Control Pad) is not activated! >> Because of the hardware features of

the chosen device ….

Page 6: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

6

Solution

We must edit the features of the device in order to enable the DPAD

1. Go to the AVD main form >> click New

2. Go to Device Definitions tab >> Choose 4.0 WVGA >> Click Clone

Page 7: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

7

3. Give it any name you want >> in Input choices : choose DPAD

4. Your new device will be ready to be used

(You can click Create AVD and fill the form, or go to step 5)

Page 8: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

8

5. Go to Android Virtual Devices tab >> click New >> fill the form like this

Choose your new device (with edited features)

6. Your emulator is ready to be used >> click Start

Page 9: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

9

Now, everything is ready…… Build your first application and let’s go in android world!

Page 10: Eng. Wafaa Audahsite.iugaza.edu.ps/wp-content/uploads/Android-Lab0-Getting Started.pdfdeveloper tools necessary to build, test, and debug apps for Android. For new Android developer,

10

Part 2: What Does it Mean ?

- SDK (ADT bundle)

The Android Software Development Toolkit (SDK) provides you the API libraries and developer tools necessary to build, test, and debug apps for Android. For new Android developer, ADT Bundle is recommended to be used to quickly start developing apps. It includes the essential Android SDK components and a version of the Eclipse IDE with built-in ADT (Android Developer Tools) to streamline the Android app development.

With a single download, the ADT Bundle includes everything you need to begin developing apps:

Eclipse + ADT plugin Android SDK Tools Android Platform-tools The latest Android platform The latest Android system image for the emulator

The Android SDK is composed of modular packages that you can download separately using the

Android SDK Manager.

- Eclipse

Eclipse is an open-source IDE (integrated development environment) for Java development. Code will be written within it.

- ADT plugin

Android Development Tools is a plugin for the Eclipse IDE that provides a

powerful, integrated environment in which to develop Android apps. It extends the capabilities of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export app packages (APKs) for distribution.

The used release of the ADT Plugin in the lab is 22.0.0.

- DALVIK VM

DALVIK VM is the process virtual machine in android operating system; it is the software that runs the apps on android devices.