Steps to install and create virtual machine on Android Studio

Instructions to create an Android virtual computer using Android Studio software. How to create a virtual Android machine to test Android applications most effectively

Hello friends, when it comes to mobile application programming, it is impossible not to mention Android programming, right? But using a real phone to test the application is sometimes not really suitable.

The reason is because the application we write must be compatible with many different phone models and many different operating system versions.

Therefore, using a real phone to test is not a very feasible option, and I believe no one does.

Well, to overcome that, people have developed a tool called a virtual machine to simulate a real smartphone. You can completely test the applications you write on it, just like on a real machine.

And in this article, I will work with you to install and create virtual machines using Android Studio tool - the leading Android application programming tool today.

Note: If you have not installed Android Studio, you can refer to the following article: Steps to install and setup Android Studio in Windows

#first. Install Android Studio software

+ Step 1: First, you create a simple Hello World application like the previous article I instructed.

=> Then, to create a new virtual machine, click on the phone icon in the upper right corner as shown below.

Picture 1 of Steps to install and create virtual machine on Android Studio

+ Step 2: A dialog box will be opened => you click Create Virtual Device… to start creating virtual Android machine.

Picture 3 of Steps to install and create virtual machine on Android Studio

+ Step 3: In this next step, you will have device options (TV, Phone, Wear OS, Table .). Here I will choose Phone (smartphone).

=> Then select a device from the list of phones with some basic parameters. If you want to choose the default, then click Next.

And if you don't like it or because the real computer has a slightly weak configuration, you can choose Clone Device… to create a virtual machine with appropriate parameters.

Picture 5 of Steps to install and create virtual machine on Android Studio

+ Step 4: Here, I choose Clone Device, so there will be a dialog box as shown below so that I can modify the parameters to suit my needs.

=> You can customize the virtual machine name, device type, screen size, RAM capacity .

Picture 7 of Steps to install and create virtual machine on Android Studio

+ Step 5: After selecting the specifications in the above step and clicking Finish, the initial search screen will have the name of a new device.

=> You select the device (click on it) => then click Next to move to the next step.

Picture 9 of Steps to install and create virtual machine on Android Studio

In fact, each Android phone model will support a certain number of operating system (Android) versions.

You will have to choose the versions to match the majority of devices currently in use to avoid incompatibility.

Let's say here I download Oreo (API 27, Android 8.1)!

Picture 11 of Steps to install and create virtual machine on Android Studio

To download, select Accept => then click Next to start downloading.

Picture 13 of Steps to install and create virtual machine on Android Studio

Due to the large size, the download process may take about 3-5 minutes (depending on your Internet speed and stability). After the download is complete, click Finish.

Picture 15 of Steps to install and create virtual machine on Android Studio

+ Step 6: Back to the previous screen we see the Android Oreo version has been downloaded successfully. Click Next to go to the next step.

Picture 17 of Steps to install and create virtual machine on Android Studio

In this step, you will confirm or change some parameters => then click Finish as shown below.

Picture 19 of Steps to install and create virtual machine on Android Studio

#2. Run the application on the Android Studio virtual machine

Open the virtual machine you just installed, you can see 3 basic buttons: Start (Run), Edit (edit) and Options (customize) - arranged from left to right. You click on the triangle icon (first) to run the virtual machine up.

Picture 21 of Steps to install and create virtual machine on Android Studio

This is the simulation of the virtual machine you choose.

Picture 23 of Steps to install and create virtual machine on Android Studio

After you have started the virtual machine, you can run Project in Android Studio. Note that you must select the virtual machine first as shown below.

The program will be loaded into the virtual machine and run as an application on the real machine.

Picture 25 of Steps to install and create virtual machine on Android Studio

Note that Android Studio + virtual machine is a RAM-consuming 'machine', so if you have a low-configuration computer (low RAM, weak chip), you should not use Android Studio.

My machine has 8GB of RAM, but running each Aneroid Studio + virtual machine is almost gone.!

Picture 27 of Steps to install and create virtual machine on Android Studio

#3. Conclude

So in this article, I have successfully installed the Android virtual machine with you on the Android Studio tool to serve the programming of mobile applications.

In fact, Android Studio is a pretty heavy tool and consumes a lot of computer resources, so please consider it.

If the computer configuration is not really good enough, you should not use this tool often (may cause crash or lag) during use.

Okay, welcome to see you in the next article.

Update 04 July 2021
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile