0% found this document useful (0 votes)
23 views52 pages

Android Studio Setup and DVM Overview

This document provides a comprehensive guide on installing and configuring Android development tools, including the Android SDK, Java JDK, and Android Studio. It outlines the requirements for different operating systems, the use of Android Virtual Devices (AVDs), and the differences between the Dalvik Virtual Machine (DVM) and Java Virtual Machine (JVM). Additionally, it details the steps to create and run a new Android project within Android Studio.

Uploaded by

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

Android Studio Setup and DVM Overview

This document provides a comprehensive guide on installing and configuring Android development tools, including the Android SDK, Java JDK, and Android Studio. It outlines the requirements for different operating systems, the use of Android Virtual Devices (AVDs), and the differences between the Dalvik Virtual Machine (DVM) and Java Virtual Machine (JVM). Additionally, it details the steps to create and run a new Android project within Android Studio.

Uploaded by

priyabhat530
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

UNIT 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

Operating System:
• For developing Android application you can use any operating
system like Windows, Mac or Linux.

• You have to install the tools necessary for developing and


running the Android applications.

• All the tools are freely available


Requirements for installation of Android studio IDE

Windows:
• Microsoft Windows 7/8/10( 32 or 64 bit)
• The Android Emulator only support 64 bit Windows
• 4GB Ram minimum, 8GB RAM recommended
• 2GB of available disk space minimum
• 1280 X 800 minimum screen resolution.
Java JDK

• 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), an
archiver (jar), a documentation generator (javadoc)
and other tools needed in Java development.
JVM
• JVM (Java Virtual Machine) is an abstract machine.
• It is a specification that provides runtime
environment in which java byte code can be
executed.
• JVM is platform dependent.
• JVM is a part of Java Runtime Environment (JRE).
• The JVM performs following operation:
1. Loads code
2. Verifies code
3. Executes code
4. Provides runtime environment.
JRE

• The Java Runtime Environment (JRE) is a set of


software tools for development of Java
applications.

• It combines the Java Virtual Machine (JVM), core


classes and supporting libraries.
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 includes the following:


• Required libraries • Debugger • An emulator
• Relevant documentation for the Android application
program interfaces (APIs).
• Sample source code
• Tutorials for the Android OS
2.2 Android Development Tools (ADT)
There are many tools available in the market which can be used
for android development.

Eclipse: Android Development Tools (ADT) is a plugin for the


Eclipse IDE that is designed to give you a powerful, integrated
environment in which you can build Android applications.

Android Studio: IT is official Integrated Development


Environment(IDE) for android app development which provides
features like code editing debugging and testing tools.
ADB(Android Debug bridge) : Android Studio includes
the Android Debug Bridge, which is command-line tool or
“bridge” of communication between android device and other
computers.

AVD Manager: Another useful feature of Android Studio is


the AVD(Android Virtual Device) Manager.

Fabric: Fabric is the development platform behind Twitter’s


mobile application.

FlowUp: IT allows you to monitor the performance of all your


production apps.
GameMaker: Studio: For android game developers, one of
the most popular development tool is GameMaker.

Gradle: It is a build system for android apps.

Instabug: Instabug is used for beta testing and bug


reporting.
2.3 Android Virtual Devices (AVDs)

• An Android Virtual Device (AVD) is a configuration that


defines the characteristics of an Android phone, tablet,
Android TV .

• The Device Manager is a tool you can launch from


Android Studio that helps you create and manage AVDs.
• AVD Contains Following Components:
• Hardware profile: The hardware profile defines the
characteristics of a device.
• System image :The Emulator uses mountable disk images
stored on your development machine similar to actual device.
• Storage area: The AVD has a dedicated storage area on the
development machine.
Skin: An emulator skin specifies the appearance of a device.
Other properties: They are the properties that can be setup
like camera, network speed, graphics, memory storage etc.
To open the AVD Manager, do one of the
following:

• Select Tools > AVD Manager.


• Click AVD Manager in the toolbar.
[Link] Tools > AVD Manager.
2. Click Create Virtual Device, at the bottom of the AVD Manager
dialog. The Select Hardware page appears.
[Link] a hardware profile, and then click Next.
[Link] you don't see the hardware profile you want, you
can create or import a hardware profile.
• The System Image page appears.

• Select the system image for a particular API level,


and then click Next.
• The Verify Configuration page appears.

• Change AVD properties as needed, and then click


Finish.
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 physical device.

• The emulator comes with predefined configurations.

• The emulator provides almost all of the capabilities


of a real Android device.
• In short, An Android emulator is an Android Virtual
Device (AVD) that represents a specific Android
device.

• Launch the Android Emulator without first running


an app To start the emulator:
1. Open the AVD Manager.
2. Double-click an AVD, or click Run .

• The Android Emulator loads. While the emulator is


running, you can run Android Studio projects and
choose the emulator as the target device.
2.5 Dalvik Virtual Machine (DVM)
• 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.

• DVM use of Linux core features like memory mgmt, multi-


threading.

• 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.
[Link] JVM DVM
1 It is stack based It is Register based
2 JVM uses java byte code and DVM uses its own byte code and
runs “.class” files runs “.dex” files
3 JVM support multiple operating DVM support Android operating
system. system.
4 The executable that gets The executable that gets
generated is .JAR generated is .APK

5 For JVM many Re-tools are For DVM very few Re-tools are
available. available.
6 It has constant pool for every It has constant pool for every
class. application.
2.6 Steps to install and configure Android
Studio and SDK
Step 1) Download Android Studio
You can download Android Studio from Google or go
to [Link].

• Choose appropriate platform either for windows,


mac or linux.
• Following are the pre requirements for
windows operating system.

• Microsoft windows 7/8/10 (32 or 64 bits)


• Minimum 3GB RAM (recommended 8GB)
• 2GB disk space
• 1280 x 800 minimum screen resolution size
• Intel processor for accelerated emulator
• Android SDK
• Step 2) Run .exe file
• splash screen of Android Studio will appear
• Step 3) Configure Android Studio
• Select a theme and click next.
1: Tool bar- It is collection of many tools like cut, copy,
paste, run debug and others.
2: Navigation bar- It helps you to navigate through the
recent open files of your project.
3: Project hierarchy- It is the hierarchy of your project’s
folders.
4: Component Tree- It shows component used in an
activity in the form of a tree structure.
5: Properties window- It shows properties of selected
item on the screen.
6: Layout editor- It shows graphical layout, how your app
will look like.
7: Palette window- Palette window shows component,
layouts, and widgets available in Android Studio.
Create an Android project

1. Install the latest version of Android Studio.


• 2. In the Welcome to Android Studio window, click Start a
new Android Studio project.

Figure 1. Android Studio welcome screen


• If you have a project already opened, select File > New > New
Project.
• 3. In the Choose your project window, select Empty Activity
and click Next.
4. In the Configure your project window, complete the
following:
• Enter "My First App" in the Name field.
• Enter "[Link]" in the Package
name field.
• If you'd like to place the project in a different folder,
change its Save location.
• Select either Java or Kotlin from the Language drop-
down menu.
• Select the checkbox next to Use androidx.* artifacts.
• Leave the other options as they are.
5. Click Finish.
[Link] > java > [Link] > MainActivity.
This is the main activity. It's the entry point for your app.
[Link] > res > layout > activity_main.xml
It contains a TextView element with the text "Hello,
World!“
3. app > manifests > [Link]
The manifest file describes the fundamental
characteristics of the app.
4. Gradle Scripts > [Link]
Each module has its own [Link] file, but this
project currently has just one module.
• Click Run .
Android Studio installs the app on the AVD and
starts the emulator. You now see "Hello, World!"
displayed in the app.
THANK YOU. .

You might also like