Steps to install and create virtual machine on Android Studio
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.
+ Step 2: A dialog box will be opened => you click Create Virtual Device… to start creating virtual Android machine.
+ 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.
+ 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 .
+ 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.
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)!
To download, select Accept => then click Next to start downloading.
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.
+ 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.
In this step, you will confirm or change some parameters => then click Finish as shown below.
#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.
This is the simulation of the virtual machine you choose.
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.
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.!
#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.
You should read it
- What is Android Studio?
- Steps to install and setup Android Studio in Windows
- Download Android Studio 4.1.2: A complete free development suite for Android
- Creator Studio - Facebook page management application
- Google launched Android Studio 3.3 with a focus on sophistication and quality
- Roblox Studio
- Android SDK - Download Latest Android SDK
- Visual Studio Community - Download Visual Studio Community here.
- 6 notable differences between Mac Studio and Mac Pro
- How to create a file to install Visual Studio offline
- Dell is about to release Studio XPS 15 and 17 inches
- Experience the Microsoft Surface Studio All-in-one, rival of the iMac
Maybe you are interested
Why You Should Have a Virtual Machine in Hand
The highest jumping robot on the planet, 30m from the ground into the air, higher than all machines and living creatures
Microsoft's official Windows 11 virtual machine is no longer available
The machine system helps bonsai trees control a robot arm holding a knife
Microsoft releases a recovery tool to help repair Windows machines experiencing CrowdStrike issues
How to transfer files between virtual machines and PCs on VMware and VirtualBox