Mobile Programming - Sharif University of...

Post on 12-Aug-2020

1 views 0 download

Transcript of Mobile Programming - Sharif University of...

MobileProgramming

Sharif University of Technology

Spring 2016

Lecture 2

Omid Jafarinezhad

Android Studio

• Download Android Studiohttp://developer.android.com/sdk/index.html

Installation of Android Studio

• On Windows: is simple, just lauch the .exe youdownloaded

• On Max OSX: drag and drop Android Studio intothe Applications folder

• On Linux: unpack the downloaded ZIP file into anappropriate location for your applications. Tolaunch Android Studio, navigate to the android-studio/bin/ directory in a terminal and executestudio.sh

Configuration

• The first time you start Android Studio you canselect if you want to import your setting froman existing installation

Setup guide

Setup guide

Setup guide

Setup guide

Android SDK Manager

Install support library• The support library allows you to use

functionality provided by higher Androidreleases in lower Android versions

Create a new Android project

• File → New Project...

Create a new Android project

Create a new Android project

Create a new Android project

Create a new Android project

Review the generated project

Create a virtual device (AVD)

• Define a new Android Virtual Device (AVD) by opening the AVD Manager via Tools → Android → AVD Manager

• Press the Create Virtual Device... button

Create a virtual device (AVD)

Create a virtual device (AVD)

Create a virtual device (AVD)

Create a virtual device (AVD)

Start your virtual device

Start the application on your virtual device

• Select Run → Run 'app' to start yourapplication. This opens a dialog in which youcan select your device to deploy yourapplication to.

Start the application on your virtual device

Eclipse ADT

• File-->New-->Other-->Android--> Android Application Project

Create a new Android project

Create a new Android project

Create a new Android project

Create a new Android project

Review the generated project

Run Android Application

Create a virtual device (AVD)

Create a virtual device (AVD)

Create a virtual device (AVD)

Logcat

Run app