Android Environment Setup
Android Environment Setup
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
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.
Choose Components
4. Next, choose the installation location. Accept the defaults and click on Next to continue.
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.
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
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.
Project Layout
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.
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).
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.
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.
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
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.
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.