0% found this document useful (0 votes)
18 views4 pages

Chapter 2

The document provides an overview of the installation and configuration of the Java Virtual Machine (JVM) and Dalvik Virtual Machine (DVM) for Android development. It outlines the differences between JVM and DVM, lists Android development tools, explains the use of Android Virtual Devices (AVD) and the Android Emulator, and details the steps to install Android Studio and the Android SDK. Key points include the need for the Java Development Kit (JDK) and the process for downloading and installing necessary software components.

Uploaded by

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

Chapter 2

The document provides an overview of the installation and configuration of the Java Virtual Machine (JVM) and Dalvik Virtual Machine (DVM) for Android development. It outlines the differences between JVM and DVM, lists Android development tools, explains the use of Android Virtual Devices (AVD) and the Android Emulator, and details the steps to install Android Studio and the Android SDK. Key points include the need for the Java Development Kit (JDK) and the process for downloading and installing necessary software components.

Uploaded by

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

Unit 02

Installation and Configuration of Android


Java Virtual Machine (JVM)

 JVM (Java Virtual Machine) acts as a run-time engine to run Java applications.
 It provide runtime environment in which bytecode can be executed.
 JVM is the one that actually calls the main method present in a java code. JVM is
a part of JRE (Java Runtime Environment).
 Java applications are called WORA (Write Once Run Anywhere). This means a
programmer can develop Java code on one system and can expect it to run on any
other Java enabled system without any adjustment. This is all possible because of
JVM.
 When we compile a .java file, .class files(contains byte-code) with the same class
names present in .java file are generated by the Java compiler.

Dalvik Virtual Machine

The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for
mobile devices.
Dalvik VM is also a virtual machine that is highly optimized for mobile devices.
Thus, it provides all the three things, that are memory management, high performance
as well as battery life.
It is strictly developed for Android mobile phones.
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.

Difference Between JVM and DVM

JVM DVM

Uses byte code and runs .class file Use byte code and runs in .dex file.

JVM is Stack based: DVM is Register based

JVM is less efficient in terms of memory DVM is more efficient in terms of


usage and performance memory usage and performance

JVM supports multiple operating DVM only supports Android operating


systems. system.

In JVM, executable is JAR DVM, executable is APK


Android Development Tools(ADT)

 Android Studio
 Eclipse
 Fabric
 FlowUp
 GameMaker: Studio
 Genymotion
 IntelliJ IDEA

Android Virtual Devices

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.

To open the AVD Manager, do one of the following:

Select Tools > AVD Manager.

Click AVD Manager in the toolbar.

Emulator

The Android SDK includes a virtual mobile device emulator that runs on your
computer. The emulator lets you prototype, develop and test Android applications
without using a physical device.

Usually by default when you launch the emulator, its orientation is vertical, but you
can change it orientation by pressing Ctrl+F11 key from keyboard.

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.

Steps to install Android studio and SDK


Pre-Installation Check List
1. Before installing Android SDK, there is need to install Java Development Kit
(JDK). Ensure that JDK is at or above 1.8.
2. Uninstall older version(s) of "Android Studio" and "Android SDK", if any.

We need to install two packages:


1. Android Studio (IDE), which is an Integrated Development Environment (IDE)
2. Android SDK (Software Development Kit) for developing and running Android
apps.

Steps to install Android studio:


Download Android Studio
1. Click Download Android Studio. The Terms and Conditions page with the Android
Studio License Agreement opens.
2. Read the License Agreement.
3. At the bottom of the page, if you agree with the terms and conditions, select the I
have read and agree with the above terms and conditions checkbox.
4. Click Download Android Studio to start the download.
5. When prompted, save the file to a location where you can easily locate it, such as
the Downloads folder.
6. Wait for the download to complete.

Installing Android SDK


Within Android Studio, you can install the Android SDK as follows:
1. Click Tools > SDK Manager.
2. In the SDK Platforms tab, select Android Tiramisu Preview.
3. In the SDK Tools tab, select Android SDK Build.
4. Click OK to install the SDK.

You might also like