0% found this document useful (0 votes)
60 views19 pages

Android Environment Setup

The document provides a comprehensive guide on installing Android Studio on Windows, detailing the prerequisites, download process, installation steps, and initial setup. It also explains the creation and management of Android Virtual Devices (AVDs) and the Android Emulator for testing applications. The guide emphasizes the importance of Android Studio as the preferred IDE for Android app development using Java or Kotlin.

Uploaded by

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

Android Environment Setup

The document provides a comprehensive guide on installing Android Studio on Windows, detailing the prerequisites, download process, installation steps, and initial setup. It also explains the creation and management of Android Virtual Devices (AVDs) and the Android Emulator for testing applications. The guide emphasizes the importance of Android Studio as the preferred IDE for Android app development using Java or Kotlin.

Uploaded by

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

CSE-3122

Mobile Application Development Project


Lab-01
Date: 08-12-2020

Installing Android Studio on Windows


Android Studio:
Android Studio is an integrated development environment to build, develop, test and
distribute Android-based applications. The IDE is developed & maintained by google. It is built
on top of JetBrains IntelliJ IDEA software.
We can develop apps for android in many ways. For Example, you can use Ionic, React
Native, NativeScript, Java, Kotlin and now the latest flutter. Each employs different techniques
to build the App. Frameworks like Ionic uses the Hybrid model, where you can build apps using
HTML & Javascript and runs inside a native app shell in the device. The Apps
using Java or Kotlin can runs natively in the device. The frameworks like React
Native & NativeScript, which allows us to write in Javascript but converts them to the native
code.
The Android Studio is preferred IDE when you choose Java or Kotlin as the language. But, even
if you choose any other tool like Nativescript or React Native, you still need to install & Manage
Android SDK and Android Emulator. These tools are part of the Android Studio and are installed
along with it. Hence it is necessary to install the Android Studio.

Prerequisites
OS & Hardware
• Microsoft® Windows® 7/8/10 (32- or 64-bit)The Android Emulator only supports 64-bit
Windows (learn more).
• 4 GB RAM minimum, 8 GB RAM recommended
• 2 GB of available disk space minimum
• 4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system
image)
• 1280 x 800 minimum screen resolution

Downloading Android Studio

Download from the link https://developer.android.com/studio#downloads

Under downloads for windows, you can either download 64 bit or 32-bit versions. The 32-bit
version can only be downloaded as a zip file, while 64 bit is available as exe installer.
The version we use for Lab class is Android Studio 3.5.3

Next, accept the license agreement and click on “Download Android Studio for Windows” to
begin download.

Accept Terms and conditions before downloading

For 32 Bit Windows:


1. Go to C:\Program Files.
2. Create a folder named Android.
3. Unzip the downloaded Zip file
4. Copy the folder Android-Studio from the unzipped file to the folder C:\Program files\Android.
5. Rename the folder from Android-Studio to Android Studio
6. Locate the Studio.exe and create a shortcut on the desktop
A. Installing Android Studio
1. Double click on the downloaded installer to begin the Installation Process.

Start of Android Studio Installation


2. Click Next on Welcome to Android Studio Setup screen

Welcome to Android Studio setup


3. After the welcome screen, you will be presented with the option to choose the components.
Select both the option and click on Next.

Choose Components
4. Next, choose the installation location. Accept the defaults and click on Next to continue.

Android Studio Installation Location


5. The next window is about selecting the start menu folder. Accept the defaults and click
on Install to begin the installation.

Start Menu Items


6. Completing the Android Studio setup screen appears once the installation completes.

Android Studio Installation Complete


Select the Start Android Studio and Click on Finish. The Android Studio starts for the first time.

B. Setup Android Studio


1. When you start Android Studio for the first time, it will ask you to Import the Studio
settings. Since this is a fresh installation choose not to import settings and click on OK.

Import Settings from the Previous Version of Android Studio


2. You may be asked to send the usage statistics to Google. Choose Don’t Send.

Share Usage Statistics with the Google


3. Now Android Studio will download a few components and then displays the Android
Studio Setup Wizard dialogue box as shown below. Click Next to continue.

Welcome to Android Studio Setup Wizard


4. The second dialogue box asks for the install type. Select the default i.e. Standard and
click on next to continue to next window.

Select Installation Type


5. The next step is the select UI Theme screen with two options Light & Darcula. Let us
keep the default Light theme.

Select UI Theme

6. Finally, the Verify Settings dialogue appears, where you can verify the settings here. Click
on Previous if you want to change any of the settings else click on finish to complete the
installation.

Verify all the settings


7. Now, the Android Studio setup wizard starts to download the various components and
installs them in the system. This will take time depending on your internet connection.

Downloading Additional Components like SDK, SDK Tools etc


8. The following screen appears once all the essential components are downloaded and
installed. At this point the Android Studio installation is complete.

Download Finished
C. Starting Android Studio
1. Once the installation and initial setup is complete, the Android Studio starts. Since it is the
first time you are starting the Android Studio, it will be present you with the Welcome to
Android Studio screen as shown below

Android Studio Initial Screen

Usually, Android Studio automatically opens the last Opened Project. But since it is a new Android
Studio installation it will not open until you create a new project or open an existing one. Hence
we will create a new project. Click on Start a new Android Studio Project.
2. The Create New Project appears. The first option is to select the type of activity. Choose
Empty, which is the default and click Next.

Select Activity
3. Configure your project is the next screen. It will ask for the name of the Application,
Package Name, Project path, language, and API Level. Keep the defaults and click on
Finish.

Project Configuration
4. Android Studio may start a few more downloads. Wait for it to finish. Once everything is
downloaded and installed, the new project is created and you are taken to the Android
workspace.

Android Studio is Installed and Ready


5. Now, you have completed all the installation steps and Android Studio is now ready to
use

Project Layout

D. Create & Manage Android Virtual Device

Before starting with the Android App development using Android Studio, we need to create an
Android Virtual Device (AVD). The AVD is then used by the Android emulator to mimic the real
device so that we can test our application. To Create AVD we first need to Install AVD Manager.
We also need to Install Android Emulator. We will learn all these in this guide.

What is AVD Manager?


The AVD Manager is a GUI interface provided by Android Studio to create and manage Android
Virtual Devices. We can create as many as AVD’s and configure them by specifying the hardware
and software parameters.

You can access the AVD Manager from the Android Studio from the menu Tools -> AVD Manager
(or Tools -> Android -> AVD Manager in the older version of the studio).

What is Android Emulator?


The Android emulator is a program that takes the configuration from the Android Virtual Device
(AVD). It then simulates the device on your computer. The emulator allows us to develop and test
Android applications without using a real device. The Android Emulator needs AVD to run. You
need to specify which AVD to use to the Android Emulator and emulator mimics the device.
How does the Emulator work?
The Android emulator uses the Operating system Virtualization technologies to mimic the real
device on your PC.
Operating system virtualization is the technique, where software is used to run many operating
systems in the hardware at the same time. Some of the virtualization technologies used in windows
are
1. Hyper-V
2. Virtual Box
3. Intel HAXM
Intel’s HAXM (Hardware Accelerated Execution Manager) is used by the Android Emulator.

A Windows CPU can support only one virtualization technology at a time. The Hyper-V is
installed, when you install the Windows OS. If it is enabled, you need to disable it.

How to Install Android Emulator?


The Android Emulator is installed, when you install Android Studio.
You can go to Android SDK Manager -> SDK Tools and check if the Android Emulator is
installed or not. You can also check if the updates are available. select the checkbox and click on
the OK button to install or update the Android Emulator.

Install or Update Android Emulator from Android SDK Manager

The following is the recommended system configuration for Android Emulator.


1. Microsoft Windows 7 and above either 32bit/64bit.
2. 3 GB RAM minimum, 8 GB RAM recommended
3. 2 GB of available disk space minimum,
4. 4 GB Hard disk space Recommended (500 MB for IDE + 1.5 GB for Android SDK and
emulator system image)
5. 1280 x 800 minimum screen resolution
What is an Android Virtual Device?
An Android Virtual Device (AVD) is an emulator configuration that represents a specific Android
device. An AVD contains a hardware profile, system image, storage area, skin, and other properties
specific to the device.

You have to create AVD for every device that you want to test.

Creating AVD
1. Start Android Studio and open the AVD Manager
2. Tools -> AVD Manager ( or Tools -> Android -> AVD Manager )
3. Click the AVD Manager icon in the toolbar.

1. Create New Virtual Device


If you are starting the AVD Manager for the first time, you will see the following screen. Else you
will see the list of AVDs created. Click on Create Virtual Device to continue

Create an Android Virtual Device


2. Select Hardware
This will take you to select Hardware Page. This page lists the devices which can be used to
generate the Android Virtual Device

Android Virtual Device Select the Hardware Configuration


In the left-hand panel displays a list of the Category of the device. It includes TV, Phone, Wear
& Tablet. Select the category.
The middle pane displays the list of devices available. Select one based on the requirement of your
app. After this click on the Next button.
Note that phones with larger resolution Choose the pixels resolution according to your
requirements as it will take huge RAM in large pixels resolution device. If your computer has low
RAM then prefer to choose less resolution device.
Click Next to continue
3. Select System Image
The Recommend tab lists the recommended system images for the Hardware you have selected in
the last page. There x86 images and other images tabs also display the list of images.

Choose System Image

The download link next to each system image name indicates that the image is not yet downloaded
into the system. Click on download to download the image.
Choose the system image based on the API level targeted by your App. The app won’t run if you
choose lower API than the one target by the App
Select the image and click on Next to continue.
4. Verify Configuration
The Final Window is Verify Configuration.

Verify Configuration
Here you can name your AVD, change startup orientation and few other hardware
properties. Click on Show Advanced Settings to show more settings.
Click on Finish to create the AVD.
Managing the AVD
Opening the AVD Manager takes you to the List of AVDS

Manage Android Virtual Device


Running/Stopping the AVD

Under the action column, click on the icon to run the AVD. The Android Emulator uses the
AVD to mimic the device. You can then use the control panel to manage the device. The
Extend control button at the bottom gives you more options.

Running Android Virtual Device

Click on the icon to edit the AVD. Right-click anywhere on the device and click on delete
to delete. Right-Click menu also gives options to duplicate, delete, wipe data, cold start & stop the
AVD.

Run Application now→

You might also like