Running on the Emulator
To run an Android application, you need a device – either a hardware device or a virtual device. Virtual devices are powered by the Android emulator, which ships with the developer tools.
To create an Android virtual device (or AVD), choose Tools → AVD Manager. When the AVD Manager appears, click the +Create Virtual Device... button in the lower-left corner of the window.
In the dialog that appears, you are offered many options for configuring a virtual device. For your first AVD, choose to emulate a Pixel 2, as shown in Figure 1.18. Click Next.
Figure 1.18 Choosing a virtual device