Unit-2_Installation and Configuration of Android
Unit-2_Installation and Configuration of Android
Installation and
Configuration of
Android
Android Operating System
Originally, Android was created by a company called Android Inc. and later Google acquired
this company in 2005. After then, Google made it open source.
Android is utilized not only in smartphones but also in tablets, netbooks, digital television
boxes, handheld game devices.
Running an Android Application
Running an Android Application
The lowest level software can be written in machine code that runs directly on the
microprocessor.
Since it is difficult to develop complex applications in machine code, operating systems are
used.
Operating systems provide a communication and control layer between the application
software and the hardware
Running an Android Application
Virtual Machine
A native application for running on a specific hardware / operating system, we can do this
using a compiler and linker.
Compiler and linker takes the source code and creates the executable file that actually runs
on the operating system.
The main advantage of native applications is their speed. However, the disadvantage is the
incompatibility across different platforms.
Running an Android Application
Virtual Machine
A good example of Virtual Machine (VM) is the Java Virtual Machine (JVM).
JVM runs on almost all operating systems and platforms.
Therefore, when we can develop Java software, it will be run on the JVM independent of the
operating system/platform.
Advantage of developing apps that run on virtual machines can then be stated as,
Running an Android Application
DVM has been the default runtime environment (virtual machine) until the Lollipop release
(Android 5.0).
ART is introduced by Android 4.0 and has been the default VM as of Android 5.0
DVM and ART basically do the same job : running Android apps independent of the
platform.
The main advantage of ART over DVM is the utilization of a concept called Ahead of Time
(AOT) compilation instead of Just in Time (JIT) approach.
Java Development Kit (JDK)
Libraries containing APIs that you can call from your Kotlin or Java source code.
The Java Virtual Machine (JVM), an interpreter that executes Java applications. You use the
JVM to run the Android Studio IDE and the Gradle build tool.
Android Software Development Kit (SDK)
Android SDK is a collection of libraries and Software Development tools that are essential
for Developing Android Applications.
These include a debugger, libraries, a handset emulator, documentation, sample code, and
tutorials.
Android SDK is compatible with all operating systems such as Windows, Linux, MacOS, etc.
Android Developer Tools (ADT)
The Android software development kit (SDK) includes many tools for developing Android apps.
1. SDK tools
1. Android Tool:
This tool helps in managing the Android Virtual Device projects as well as the installed components of the
software development kit.
2. Emulator Tool:
It helps us in testing the applications without the need of using the application on an actual device.
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.
Create Android Virtual Device (AVD)
The Verify
Configuration window
appears.
AVD ID (Advanced) View the AVD ID. The AVD ID is derived from the AVD name. You can use the ID to
refer to the AVD from the command line.
Hardware Profile Click Change to select a different hardware profile from the Select Hardware window.
System Image Click Change to select a different system image from the System Image window. An
active internet connection is required to download a new image.
Screen: Screen Resolution Enter a width and height in pixels to specify the total number of pixels on the simulated
screen.
Screen: Round Select this option if the device has a round screen, such as some Wear OS devices.
Memory: RAM Enter the RAM size of the device and select the units, one of B (byte), KB (kilobyte), MB
(megabyte), GB (gigabyte), or TB (terabyte).
Emulators
The emulator helps the developer to run a trial product virtually without an
actual hardware device.
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.
The DVM was a software environment that translate Java code into a language that Android
devices could understand.
It also manage memory usage, kept apps separate from each other, and ensured apps
worked well.
Dalvik Virtual Machine (DVM)
Features of DVM
Register-Based Architecture
Optimized for Mobile Devices
Dex Bytecode Execution
Just In Time (JIT) Compilation
Support for Multithreading
DVM was slimmed down to use less space.
An uncompressed .dex file is smaller in size as
compare to compressed .jar
With using DVM, android device can run multiple
instances of VM efficiently.
Difference between DVM & JVM
Steps to Install & Configure Android Studio and SDK
Step 1:
Go to Android https://developer.android.com/studio 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 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:
Once “Finish” is clicked, it will ask whether the previous settings need to be imported [if the
android studio had been installed earlier], or not.
It is better to choose the ‘Don’t import Settings option’. Click the OK button.
Step 6:
This will start the Android Studio. Meanwhile, it will be finding the available SDK
components.
Step 7:
After it has found the SDK components, it will redirect to the Welcome dialog box.
Choose Standard and click on Next. Now choose the theme, whether the Light theme or the
Dark one.
The light one is called the IntelliJ theme whereas the dark theme is called Dracula. Choose as
required. Click on the Next button.
Step 8:
Now it is time to download the SDK components.
Click on Finish. Components begin to download let it complete.
The Android Studio has been successfully configured.
Now it’s time to launch and build apps. Click on the Finish button to launch it.
Step 9:
Click on Start a new Android Studio project to build a new app.
Thank You