0% found this document useful (0 votes)
16 views26 pages

MAD Unit No 2 Notes

The document provides a comprehensive guide on the installation and configuration of Android development tools, including the Android SDK, Java JDK, and Android Studio. It covers essential components such as operating systems, emulators, and the differences between the Java Virtual Machine (JVM) and the Dalvik Virtual Machine (DVM). Additionally, it outlines the steps required to set up Android Studio and SDK on a Windows system.

Uploaded by

milee1722
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views26 pages

MAD Unit No 2 Notes

The document provides a comprehensive guide on the installation and configuration of Android development tools, including the Android SDK, Java JDK, and Android Studio. It covers essential components such as operating systems, emulators, and the differences between the Java Virtual Machine (JVM) and the Dalvik Virtual Machine (DVM). Additionally, it outlines the steps required to set up Android Studio and SDK on a Windows system.

Uploaded by

milee1722
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

25 January 2025 01:26 PM

MAD {Unit No. 2: Installation and Configuration of Android}

Contents:
2.1 Operating System, Java JDK, Android SDK
2.2 Android Development Tools (ADT)
2.3 Android Virtual Devices (AVDs)
2.4 Emulators
2.5 Dalvik Virtual Machine, Difference between JVM and DVM 2.6 Steps to install and
configure Android Studio and SDK
______________________________________________________________________

____2.1 Operating System, Java JDK, Android SDK

2.1.1 Operating System:


A mobile OS is an operating system for smartphones, tablets, PDAs, or other mobile

devices.
Mobile OS combines features of a personal computer OS with other features useful for

mobile or handheld use; usually including, and most of the following considered
essential in modern mobile systems; Touchscreen, cellular, Bluetooth, Wi-Fi, GPS
mobile navigation, camera, video camera, speech recognition, voice recorder, music
player, etc.
Popular options include iOS from Apple, Android from Google, and Huawei's

HarmonyOS.
• Mobile operating systems power modern gadgets.
With them, phones become portable computers, communication tools and e-

ntertainment hub.
2.1.2 Java JDK:
Compiled by SAYYED SHABANA USMAN___ Page 1
2.1.2 Java JDK:

i.
JDK:
Java Development Kit (JDK) is a complete software environment for building

applications and applets using the Java programming language.
• It is platform-dependent.
• Therefore, it has different OS platform versions for Windows, Linux, Mac, etc. • It
allows reading, writing, and executing the Java program. • Includes various tools
required for writing Java programs. • It includes an applet viewer, Java application
launcher, debugger, compiler, etc.• JDK also consists of JRE for executing Java
programs. The Java application launcher helps in opening a JRE. Then, it loads the
necessary

details and executes the program’s main method.
JDK = Development Tools + JRE (Java Runtime Environment) ii.

JRE:
JRE software includes JVM and class libraries to run Java programs

independently.
• Although it can execute the code.
Yet, JRE comes bundled with Java Development Kit (JDK) to provide a complete

application development experience.
The JRE includes class libraries along with JVM and its supporting files.(Note: It

does not include separate tools, such as a debugger for Java development.)JRE
comprises significant package classes such as util, math, AWT, lang, and

various runtime libraries.
JRE = JVM + Class Libraries (For Running the Java Applications)

iii.
JVM:
Java Virtual Machine (JVM) is an abstract machine responsible for compiling and

executing Java code.
It is a part of the Java Runtime Environment (JRE), which calls the main function

of a program.
• JVM facilitates a platform-independent way of executing Java source code. Compiled by
SAYYED SHABANA USMAN___ Page 2

• JVM facilitates a platform-independent way of executing Java source


code. • Its basis on WORA (Write Once Run Anywhere).
• It has a class loader, runtime data area, execution engine, and
libraries.•
JVM comes with JIT(Just-in-Time) compiler that converts Java source
code into machine code.
First, the Java compiler compiles a Java file into a Java .class file. Then,
the .class file works as an input into the JVM, which loads and executes
the class file.

2.1.3 Android SDK:


• Android development starts with the Android SDK(Software Development
Kit). It is a software development kit that enables developers to create
applications for the

Android platform.
The Android SDK (software development kit) is a set of development tools used to

develop applications for Android platform.
The Android SDK includes the following:

i. Required libraries.
ii. Debugger.
iii. An emulator.
iv. Relevant documentation for the Android application program interfaces
(APIs).v. Sample source code.
vi. Tutorials for the Android OS.

2.2 Android Development Tools (ADT):


s
Android Languag Ru
Developme es OS On
nt IDEs

Android Java Andro WVisual Studio


Studio C wsC++
id MaCross-
C++ S
Kotlin Lin

Eclipse J Andro An
C id iOS su
C++
C# Linux
JavaScr Ja
ipt MacOS
Python
more Windo
w
Free

(with
C
Platform
Experienced Proprietary, Free to

Windows
Xamarin) C# MacOS $2,999 +
Visual Studio
Windows
Linux
Code is Open
Visual
Android Source MIT

Compiled by SAYYED SHABANA USMAN___ Page 3


Visual more
Android JavaScript
Basic more
iOS Source MIT
PHP
NetBeans Ja Cross- Windo
IntelliJ Any OS Wind C platform ws
IDEA Scala supporti C++ MacO
Groovy ng Java MacO HTML S
Kotlin Linux PHP Linux
JavaScri JavaScr Solari
pt ipt
TypeScri others
pt SQL
Komodo Cross- Wind PhoneGap Cross- Windo
JavaScr platform ws CSS platform ws
ipt MacO JavaScri MacO
Python S pt Andro S
PHP Linux id iOS Linux
HTML Andro
Ruby d
Others Windo
ws
Phone
Cordova H Cross- Wind
CSS platform ws
JavaScri MacO App Ka Android WMacO
pt Androi S Inventor Linux
d Linux
Windo
ws iOS
MacOS
Ubuntu

Free to

$499/year

Free
Free to

$394+

Free
Free

AIDE Java
Android
Android Amateurs or
ProprietaryFree with
C
Web
C++ in-app
mobile professionals purchases

Compiled by SAYYED SHABANA USMAN___ Page 4


C++ professionals purchases
XML HTML CSS
JavaScript

2.3 Android Virtual Devices (AVDs):


An Android Virtual Device (AVD) is a configuration that defines the characteristics of

an Android phone, tablet, Wear OS, Android TV, or Automotive OS device
that you want to simulate in the Android Emulator.
The Device Manager is a tool you can launch from Android Studio that helps you

create and manage AVDs.


To create a new AVD:

i. In Android Studio, click Tools, then select Device Manager. Device


Manager window appears.

ii. Click + button, then select Create Virtual Device in the Device
Managerpanel.The Select Hardware window appears.

Compiled by SAYYED SHABANA USMAN___ Page 5


(Notice that only some hardware profiles include Play Store. These
profiles are fully CTS compliant and might use system images that
include the Play Store app).
iii. Select a hardware profile, then click Next.
(If you don't see the hardware profile you want, you can createor importa
hardware profile).
The System Image window appears.
iv.
Select the system image for a particular API level. If you see ↓ Download
button
Compiled by SAYYED SHABANA USMAN___ Page 6
iv.
Select the system image for a particular API level. If you see ↓ Download
button next to the system image, you need to click it to download the
system image. (You must be connected to the internet to download it).
Then clickNext.
(The API level of the target device is important, because your app won't be
able to run on a system image with an API level that's less than that
required by your app, as specified in the minSdkVersion attribute of the
app manifest file).

The Verify Configuration window appears.

v.
Change the AVD properties as needed, and then click Finish. Click Show
Advanced Settings to show more settings, such as the skin.
The new AVD appears in the Virtual tab of the Device Manager and the
target device menu.
Compiled by SAYYED SHABANA USMAN___ Page 7

2.4 Emulators:
The Android Emulator simulates Android devices on your computer so that you can

test your application on a variety of devices and Android API levels without
needing to have each physical device.
• The emulator provides almost all of the capabilities of a real Android device.
You can simulate incoming phone calls and text messages, specify the
location of the

device, simulate different network speeds, simulate rotation and other
hardware sensors, access the Google Play Store, and much more.
Testing your app on the emulator is in some ways faster and easier than doing so on
a

physical device.
For example, you can transfer data faster to the emulator than to a device
connected

over USB.
The emulator comes with predefined configurations for various Android phone, tablet,

Wear OS, and Android TV devices.

In short, An Android emulator is an Android Virtual Device (AVD) that
represents a specific Android device.
You can use an Android emulator as a target platform to run and test your Android

applications on your PC.
• Using Android emulators is optional.
• To start the emulator:
1. Open the Device Manager.
2. Double-click on AVD, or click ►Run.

Compiled by SAYYED SHABANA USMAN___ Page 8


The Android Emulator loads.
While the emulator is running, you can run Android Studio projects and choose the

emulator as the target device.
• You can also drag one or more APKs onto the emulator to install them,

and then run Compiled by SAYYED SHABANA USMAN___ Page 9

You can also drag one or more APKs onto the emulator to install them, and then run

them.

2.5 Dalvik Virtual Machine, Difference between JVM and DVM

2.5.1 Dalvik Virtual Machine:


As we know the modern JVM is high performance and provides excellent memory

management.
• But it needs to be optimized for low-powered handheld devices as well. The
Dalvik Virtual Machine (DVM) is an android virtual machine optimized for

mobile devices.
• It optimizes the virtual machine for memory, battery life and
performance. • Dalvik is a name of a town in Iceland.
• The Dalvik VM was written by Dan Bornstein.


The DEX compiler converts the class files into the .dex file that run on the Dalvik
VM.• Multiple class files are converted into one dex file.
• The javac tool compiles the java source file into the class file.
The dx tool takes all the class files of your application and generates a single .dex file.

It is a platform-specific tool.
• The Android Assets Packaging Tool (aapt) handles the packaging process. 2.5.2

Difference between JVM and DVM:


JVM(Java Virtual Machine) Source code files are first of all compiled
into Java bytecode format like JVM.
Stack-based VM that performs Further, theDEX
arithmetic and logic operations
through push and pop
operands. The result of
operations is stored in stack
memory.
Java source code is compiled
into Java bytecode
that
format(.class file)further
compiler(dx tool) converts the Java
translates into machine code.
bytecode into

DVM(Dalvik Virtual Machine)


Register-based VM that uses registers
located in the CPU to perform arithmetic
and logic operations.

Dalvik bytecode(classes.dex) filethat will


be used to create the .apk file.

More information is required to the


Instruction size is larger as it needs to encode the
VM for data loading and
source and destination register of the VM.
manipulation as well as method
loading in the stack data structure.

Compiled by SAYYED SHABANA USMAN___ Page 10

A single instance of JVM is


Compiled bytecode size is configured with shared processes
compact because the location of and memory space in order to run
the operand is implicitly on the all deployed applications.
operand stack.
Supports multiple operating
The executable file for the device systems like Linux, Windows,
.jar file. and Mac OS.
Compiled bytecode size is larger as each the code of each application.
instruction needs all implicit operands.

The executable file for the device is.apk


file.
The device runs multiple DVM instances
with a separate process in shared
memory space to deploy
Support only the Android operation
system.

2.6 Steps to install and configure Android Studio and SDK: First, check the

system requirements for Android Studio. Then download the latest


version of Android Studio.
• Here are the system requirements for Windows:
Requiremen Minimum
t
OS 64-bit Microsoft
Windows 8
RAM 8 GB RA

Recommended
Latest 64-bit version of Windows
16 GB RAM or more
CPU x86_64 CPU architecture; 2nd
Latest Intel Core processor
generation Intel Core or newer, or
AMD CPU with support for a
Windows Hypervisor Framework.

Compiled by SAYYED SHABANA USMAN___ Page 11

resolution
Disk space 8 GB (IDE and Androi

Emulator)
Solid state drive with 16 GB or more
Screen 1280 x 800 1920 x 1080

To install Android Studio on Windows:



i. Visit https://developer.android.com/studio .
ii. Click on Download Android Studio Ladybug Feature Drop.

Compiled by SAYYED SHABANA USMAN___ Page 12

iii.
Agree to terms and conditions. Then click on Download button. iv. Double-click
on downloaded file for Android Studio.
v. Click Next button.

vi. Select all components if not selected. Then click Next button.

Compiled by SAYYED SHABANA USMAN___ Page 13


vii. Change location of Android installer if you want. Then click Nextbutton.

viii. Click Install button.

ix. Installation completed. Then click Next button.


Compiled by SAYYED SHABANA USMAN___ Page 14

x.
Android Studio setup completed. Then click Finish button.

xi. Loading Android Studio.


xii. Click Don't send button.

Compiled by SAYYED SHABANA USMAN___ Page 15

xiii. Click Next button.


xiv. Choose Standard type of setup. Then click Next button.

xv. Components of SDK tool listed. Then click Next button.

Compiled by SAYYED SHABANA USMAN___ Page 16


xvi.
Accept license agreement for all SDK tool components. Then click
Finishbutton.

xvii. Downloading SDK tool components.


xviii. SDK tool components downloaded. Then click Finishbutton.

Compiled by SAYYED SHABANA USMAN___ Page 17

xix.
Android Studio is ready for Mobile Application Development. Now you can
create projects for your Android Application.
Compiled by SAYYED SHABANA USMAN___ Page 18

You might also like