Chapter 2
Chapter 2
Chapter 2
Installation & Configuration of Android
Weightage : 06 Marks
1. Java JDK & Android SDK
1. Java JDK (Java Development Kit)
The Java Development Kit (JDK) is a software development environment used for developing
Java applications and applets. It includes the Java Runtime Environment (JRE), an
interpreter/loader (Java), a compiler (javac), Java Virtual Machine (JVM), a documentation
generator (Javadoc) and other tools needed in Java development.
1.1 JRE (Java Runtime Environment)
The Java Runtime Environment, or JRE, is a software layer that runs on top of a computer's
operating system software and provides the class libraries and other resources that a
specific Java program needs to run.
1.2 JVM (Java Virtual Machine)
Java Virtual Machine (JVM) is a engine that provides runtime environment to drive the Java
Code or applications. It converts Java bytecode into machines language. JVM is a part of
Java Run Environment (JRE).
2. Android SDK (Software Development Kit)
The Android SDK is a collection of software development tools and libraries required to
develop Android applications. Every time Google releases a new version of Android or an
update, a corresponding SDK is also released which developers must download and install.
2. Android Development Tools or IDE
The android developer tools let you create interactive and powerful application
for android platform.
1. Android Studio
2. Eclipse
3. Fabric
4. Flow Up
5. Game Maker: Studio
6. Gradle
7. ADB (Android Debug Bridge)
8. AVD Manager
3. Android Virtual Device (AVD)
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 AVD Manager is an interface you can launch
from Android Studio that helps you create and manage AVDs.
Emulator
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.
4. Difference Between JVM & DVM
1. JVM is Java Virtual Machine & DVM is dalvik virtual machine.
2. JVM Supports Multiple Operating Systems But DVM Supports only Android Operating
Systems.
3. JVM is executable in JAR and DVM is executable in APK.
4. Architecture
The JVM is a stack-based VM where all the arithmetic and logic operations are carried out
via push and pop operands and results are stored on the stack. The stack is also the data
structure to store methods.
Contrastingly the DVM is a register-based VM. These registers located in the CPU carry out
all the arithmetic and logic operations. The register is the data structure to store operands.
5. Compilation
Java code is compiled inside the JVM to an intermediary format called Java bytecode (.class
files). Then, the JVM parses the resulting Java bytecode and translates it to machine code.
On an Android device, the DVM compiles the Java code to an intermediate format called Java
bytecode (.class file) like the JVM. Then, with the help of a tool called Dalvik exchange or dx,
it transforms Java bytecode to Dalvik bytecode. Finally, the DVM translates the Dalvik
bytecode to binary machine code.
Both VMs use the Just-In-Time (JIT) Compiler. The JIT Compiler is a type of compiler that
performs the compilation during the runtime.
5. Steps to Install & Configure Android Studio
1. System Requirements
2. Install JAVA JDK 5 or later Version & Android Studio
3. Setup Android Studio
4. Create Android Virtual Device (AVD)
Review Questions: