If you develop apps for Android devices and usually plug a device into your computer to test your apps, this may be a way to save time. Android Studio contains a feature for developers who want to test their apps on the latest API without using an actual device. It creates a virtual machine that will test your apps right on the screen of your PC. This tutorial will show you how to set up a virtual device for Android Pie 9.0.
What Is Android Studio?
Android Studio launched in 2014 and is the official Integrated Idea Development Environment for Android app development. It is available for download on Windows, macOS and Linux-based operating systems.
It allows you to enhance your productivity with features such as:
- A flexible Gradle-based build feature.
- A fast, feature-filled emulator.
- The ability to develop apps for all Android devices.
- A wide variety of testing tools and frameworks.
- C++ and NDK support.
To install the program, go to Android Studio and download the installation files. You should also update Java before running this program install to avoid any issues.
Installing Android Studio on Your PC
There are quite a few lengthy times of installation and extraction of files in this process. You will need some time to complete the initial setup if you don’t already have the program installed.
Once the program fully installs, you are ready to add the Android Pie emulator so that you can build and test your apps all in one place.
Open the program. It will be in your Start Menu at the top with the recent programs.
Create a new Android Development project and enter the Development Environment.
Agree to the license policy to continue. Click Accept and then Next.
Wait for the files to extract before continuing.
When the download and extraction complete, click Finish.
Create the Virtual Device
To create an Android Pie virtual device for your testing, you first need to create a new Android Studio project. If you have previously used the program, you can also choose to open one you have already created. In that case, skip ahead to step five.
Click to add an activity.
Name the activity.
Click Finish.
Wait while the program builds your project.
Once it finishes, go to the Tools drop-down menu and select AVD Manager.
Click the Create Virtual Device button.
Choose a device from the list to emulate and click Next.
Create a new Virtual device for Android 9.0 Pie by clicking the Create Virtual Device button.
Choose a device to emulate.
Determine which version of Android you want to run and check to make sure the API Level category shows 28.
Click download and accept the license agreement.
Wait for the system image to download, then click Finish.
When the program returns to the System Image window, click Next.
The Verify configuration box will appear. Click Finish if everything looks correct.
You should now be ready to test your apps directly from the Android Studio app.
If you need to create another virtual device, when you open AVD Manager from the tools, you will see this box. The Create Virtual Device command is in the bottom-left corner.
This program does take some time to set up, but you should be able to save that and more time, whenever you need to run tests on your Android applications.
Tracey Rosenberger spent 26 years teaching elementary students, using technology to enhance learning. Now she’s excited to share helpful technology with teachers and everyone else who sees tech as intimidating.
Our latest tutorials delivered straight to your inbox