In this tutorial, we will learn what is AVD Manager and how you can we create an AVD (Android Virtual Device) to test your first android application.
An Android Virtual Device (AVD) is a device configuration that runs on the Android Emulator. It provides virtual device-specific Android Environment in which we can install & test our Android Application. AVD Manager is a part of SDK Manager to create and manage the virtual devices created.
To open AVD manager, go to Tools → Android → AVD Manager as shown in below image.
It will open AVD Manager with a list of created virtual devices as shown in below image. It may be empty for you now as you haven't created any device as of now. To create a new device, click on Create Virtual Device button at the bottom-left corner.
It will open a window to Select Hardware type for your virtual device. This list contains almost all the Android devices with their respective settings. Select any one out of all the devices listed, with your required configuration (like Size of the screen, Resolution and Density) and click on Next.
Next you will be asked to select System Image that will be the running Android Version for your newly created virtual device. You can choose any Android system images that are already available in your Android Studio, or Download the one you want, by clicking on the Download option available with the names. Recommended section will list the best choices available as per the latest updates available. x86 Images contain images that are mostly used and Other Images section contain system images with Google Play Services. Choose as per your required configuration (We've selected API level 21). Click on Next once you are done.
Click on Show Advanced Settings and you will see more advanced settings for your virtual device as shown in image below. Here you have settings for Camera, Network, Memory (RAM & Heap) and Storage (Internal & External) and Virtual Device Frame.
You can configure your device as per your requirements and click on Finish. Android Studio will immediately start building AVD with the selected configurations & might take some time. When it completes, AVD Manager will list out your virtual device in the available devices list as shown in below image.
From the Action column(last column of the table), you can perform several actions like Launch AVD and Edit AVD configurations etc. Launch your first AVD by clicking Start icon(green play icon). It will start a Virtual Device just like an Android Device as shown in below image. Side toolbar contains buttons to perform actions like volume up-down, change orientation, go back, go to home or recent & more. You can also turn the power off for the virtual devices using the power button and to close the virtual device select close button.
Now you have your own Android Virtual Device running on your system where you can test various Android Application Projects. You can have more than one virtual devices in your AVD manager as per your project requirements. Similarly you can also create AVD for devices like Android TV and Android Wear for testing.