Android Emulator in Android Studio

In this series of Android Tutorials, today we are going to discuss Android Emulator. It is an Android Virtual Device (AVD) that represents a virtual Android device. We can use the emulator as a testing device to perform and examine our android application on the personal computer. The Android emulator provides us almost all the functionality of a real android device. We can access phone calls and text messages. It also allows us the functionality of the live location of the current device. The emulator affects rotation and other hardware sensors. It also accesses the Google Play store and many more.

Virtual Emulator

The Android emulator comes with predefined configurations for various Android phones, Wear OS, tablets, Android TV devices.

Requirements:

The Android emulator needs additional requirements exceeding the basic system requirement for Android Studio.

These requirements are:

Install Emulator:

To install the emulator component, select the Android Emulator component in the SDK Tools tab of the SDK Manager.

Run an Android App on Emulator:

We can run an Android app form the Android Studio project, or we can run an app that is installed on the Android Emulator since we run any app on a device.

To start an Android Emulator and run the app:

1. First, we need to create an Android Virtual Device (AVD) that the emulator can use to install and run your app.

To create a new AVD:-

https://www.gbandroidblogs.com/
https://www.gbandroidblogs.com/
https://www.gbandroidblogs.com/
https://www.gbandroidblogs.com/
https://www.gbandroidblogs.com/
https://www.gbandroidblogs.com/

2. Go to the toolbar; choose the AVD, to run our app from target devices from the drop-down menu.

3. Then Click Run.

Launch the Emulator without first running an app:

To start the emulator:

While the emulator is running, we can run our project and select the emulator as the target device. We can also drag the APKs file to install on an emulator, and then run them.

Launch the Emulator with Command Lines (CMD)

1. Make sure you set the path of ANDROID_SDK/emulator is in your environment path variable, this path contains emulator.exe

2. Now open the terminal and write the code: emulator –list-avds

Example output:

C:\Users\Golap>emulator –list-avds

Nexus_4_API_21

3. At last, run the emulator using this command

emulator @Nexus_4_API_21

** Change according to your emulator name

And make sure you have already install JAVA JDK and Android Studio with Android SDK build tools.

Hope you like it. For more visit GBAndroidBlogs

Thank you!

Hi everyone, myself Golap an Android app developer with UI/UX designer.