I am using Android Studio 2.3.1 on my Ubuntu17 system and I am new to Android development.
So when I wanted to test my first code on AVD, I got this screen:

Therefore, when I select a Nexus virtual device, nothing happens, and this is what I got:

Nothing happens and I always see a message:
Waiting to connect target device.
And after some time I received this message:
Error while waiting for the device: it will expire after 300 seconds, waiting for the emulator to exit.
Of course, I turned on ADB integration.
Please help solve this problem.
source share