Creating a new Emulator using Device Manager in Android Studio

Creating a new Emulator using Device Manager in Android Studio

Android Studio enables developers to build applications using Java and Kotlin. Still, when it comes to running applications, most of us either have a physical device or those who don’t have one. What should they be doing? Here comes a part of Android Studio which allows us to create Emulators which emulate a real physical device.

The first step to understanding how to create an emulator is to learn how to create a project in Android Studio. Below, I have a step-by-step tutorial to create a project in Android Studio and I have discussed the whole project structure that comes with it.

Creating a new project in Android Studio

Briefly understanding Android Emulators

A device that emulates (replicates) the behavior of a physical Android device. The top 3 benefits of using an Android Emulator are

  1. Testing user interface on different devices
  2. Running applications on different software versions
  3. Monitoring and Analyzing an application on different devices

Device Manager

To create emulators in Android Studio the Device Manager allows creating different emulators. In older versions of Android Studio, it was called Andoird Virtual Device Manager a.k.a AVD Manager. Select the device manager to create a device/emulator in Android Studio. The device manager is at the right-most vertical menu, the third icon as shown below. The Device Manager or Android Virtual Device Manager is also available at the top menu under the tools section.

Clicking the device manager will bring up a tab with a default emulator available that is downloaded when installing Android Studio as shown below. You are here to learn how to create one so we will delete the one already available.

To delete the preinstalled emulator, click the vertical dots and select Delete, and a dialog box will appear to confirm deletion. Proceed with choosing Yes. The top menu of the Device Manager consists of three buttons which are the following:

  1. Group: It allows grouping multiple emulators based on their properties.
  2. Create Virtual Device: For creating a new virtual device.
  3. Pair Devices Using Wi-Fi: For Pairing your physical device using Wi-Fi.

We will be concentrating on point #2 which is Create Virtual Device.

Creating a new Virtual Device

Let’s start creating a new virtual device. Click the plus button and a new window will open Virtual Device Configuration.

This window allows you to configure an Emulator based on the following properties:

  1. Category
  2. Name
  3. Play Store
  4. Size
  5. Resolution
  6. Density

Let’s cover briefly of what these properties are:

Category

It is the type of Emulator you are interested in creating. To date, there are 7 different categories from which emulators can be created.

  1. Phone – Your everyday pocket companions running on Android.
  2. Tablet – Bigger screened devices for entertainment and work, powered by Android.
  3. Wear OS – Wrist-worn devices connected to your Android ecosystem.
  4. Desktop – Devices that offer both laptop/desktop and tablet modes with Android.
  5. TV – Smart televisions with the Android operating system built-in.
  6. Automotive – Built-in systems in vehicles running the Android OS.
  7. Legacy – Devices that may no longer receive updates or support.

Name

Here you will find the names of the devices based on the category selected. The recommended way is to clone a pre-created device and add your label rather than using the default ones. Names and Specifications of these devices are given according to real-world devices.

Play Store

Since not all Android devices come with the Play Store, the column has a Google Play badge to show which emulators support it. It is recommended to use Emulators with Play Store because of various reasons e.g. testing dynamic links between a dev and a prod application whereas the production application might need to be downloaded from the Google Play Store.

Size

Resolution

Density

About Author

Arslan Mushtaq

A skilled software developer with 6+ years of experience in mobile and web development, proficient in technologies such as React Native, Native Android, and iOS for mobile, and React.js and Next.js for web development. Additional expertise in backend technologies including Node.js, Express.js, Amazon Web Services, and Google Firebase, facilitating collaboration with cross-functional teams across various domains.