Press enter to see results or esc to cancel.

Creating an Android Virtual Device (AVD) – Android Emulator

Share this
()

An Android application can be installed and run both on a physical device and on an Android Emulator provided by Android Studio called Android Virtual Device (AVD). In Android app development, you will always have to compile and execute the code many times before arriving at a stable final version. However, before using an AVD (Android Emulators), you must first create and configure it, based on the specifications of a specific device model.

Android Virtual Device (AVD) are therefore essentially emulators that allow you to test Android apps without physically installing them on a physical device. An AVD can be configured to emulate a variety of hardware features such as screen size, memory capacity, accelerometer, camera, etc.

Inside Android Studio there are already a number of predefined Android Virtual Devices (Android Emulators) that represent different types of devices. Additional AVD models can be loaded or custom configurations can be created based on the app’s requirements we are developing.

Topic: Lesson 8 – Creating an Android Virtual Device (AVD) – Android Emulator

How to Create Android Virtual Device (AVD) – Android Emulator

So let’s see how to create an Android Virtual Device for a specific configuration of a device. After starting Android Studio, click on the Tools menu and select  AVD Manager, or locate the avd icon on the toolbar and click on it.

open avd manager android studio
open avd manager android studio

The first time the AVD Manager is started there is no AVD and therefore the screen displayed should be the following.

Create Android virtual devices
Create Android virtual devices

Then click on the Create Virtual Device button and we will display the Virtual Device Configuration dialog

android emulator hardware - nexus 5
android emulator hardware – nexus 5

Suppose we want to create an emulator for the Nexus 5 smartphone, then select as the Phone category and in the device list the Nexus 5 item and click on Next.

download system image for google nexus emulator
download system image for google nexus emulator

In the next screen, we configure the System Image. Since this is the first time, we will have to download the system image. In our case, we gonna download Android version 10.0 (API 29). Click on the Recommended tab, and click download.

download system image android 10.0 API 29
download system image android 10.0 API 29

Depending on your internet speed, this will take a few minutes to download the entire system image for google nexus version 10.0.

Finally, we choose a name for our AVD (Android Emulator), we don’t touch the other options, and we click on Finish.

Topic: Lesson 8 – Creating an Android Virtual Device (AVD) – Android Emulator

Android emulator name and start up orientation
Android emulator name and start up orientation

At this point, we will find the one we just created in the list of AVDs

Android nexus 5 AVD
Android nexus 5 AVD

To test the newly created Android Emulator, all we need to do is click on the Play Button (triangle) in the Actions column.

 

click play to start android studio emulator AVD
Click play to start android studio emulator AVD

After a few minutes of waiting, we should view the emulator.

avd emulator screenshot
avd emulator screenshot

Now, we can compile and run the first Android app. Just click on the green triangle positioned on the top toolbar.

android studio avd

At this point, Android Studio will automatically compile and run our App on the emulator (Nexus 5) we just created.

How useful was this Lesson?

Click on a star to rate it!

Average rating / 5. Vote count:

Be the first to rate this post.!

As you found this post useful...

Follow us on social media!

We are sorry that this lesson was not useful for you!

Let us improve this lesson!

Tell us how we can improve this lesson?

Share this