Android Unit 2
Android Unit 2
Software Development Kits (SDKs) are sets of tools and libraries that
developers use to create software applications for specific platforms or
frameworks. SDKs provide a set of pre-built functions, APIs,
documentation, and other resources to simplify and streamline the
development process.
Android Studio is the official IDE (Integrated Development Environment) for
Android app development and it is based on JetBrains’ IntelliJ IDEA software.
Installation Guide:
Step 1: Head over to https:///developers.android.com /studio/download to get
the Android Studio executable or zip file.
Step 2: Click on the Download Android Studio Button.
Click on the “I have read and agree with the above terms and conditions”
checkbox followed by the download button.
Click on the Save file button in the appeared prompt box and the file will start
downloading.
Step 3: After the downloading has finished, open the file from downloads and
run it. It will prompt the following dialog box.
Click on next. In the next prompt, it’ll ask for a path for installation. Choose a
path and hit next.
Step 4: It will start the installation, and once it is completed, it will be like the
image shown below.
Step 5: Click on “Finish”
Android uses two different virtual machines for running applications: the Dalvik
Virtual Machine (DVM) and the Java Virtual Machine (JVM).
Dalvik Virtual Machine (DVM):
1. Purpose:
DVM is specifically designed for Android and is optimized for
mobile devices with limited resources.
2. Bytecode:
Android applications are compiled into a special bytecode format
known as Dalvik Executable (DEX). This bytecode is optimized for
efficiency in terms of storage and execution on mobile devices.
3. Memory Efficiency:
DVM is designed to be memory-efficient, which is crucial for
mobile devices with varying levels of available RAM.
4. Just-In-Time Compilation (JIT):
DVM uses a Just-In-Time compilation approach. It compiles the
DEX bytecode into native machine code at runtime, improving the
performance of the application.
5. Multitasking:
DVM is designed to support multiple instances running in separate
processes, which is essential for Android's multitasking capabilities.
Java Virtual Machine (JVM):
1. General Purpose:
JVM is a general-purpose virtual machine that can run Java
applications on any platform.
2. Bytecode:
Java applications are compiled into bytecode, which is then
interpreted and executed by the JVM.
3. Memory Usage:
JVM tends to be more resource-intensive compared to DVM. It is
designed to run on a wide range of computing devices, from
desktops to servers.
4. Just-In-Time Compilation (JIT):
Like DVM, some JVM implementations use Just-In-Time
compilation to improve the performance of Java applications.
5. Platform Independence:
One of the key features of JVM is platform independence. Java
applications can theoretically run on any device with a JVM,
regardless of the underlying hardware and operating system.
DVM stands for Dalvik Virtual Machine. It is a specialized virtual machine designed for the Android operating
system to execute applications written in the Java programming language. DVM is specifically optimized for
mobile devices with limited resources, such as smartphones and tablets.