Flutter | Android Virtual Device - AVD in 8 steps
Tags: beginners, flutter, android, dart
Published: 2020-09-26 05:27:37

#Hi

Today we will discuss and I hope to learn how to make Android Virtual Device in Android Studio.

I assume that you have installed Android Studio on your machine/computer.

###Step 1: Open Android Studio

Open your Android Studio and create New Flutter Project -> Flutter Application

After that click 'Finish' and wait a few seconds.
Then you will get a project, something like this. 
(*feel free to call your project as you want, and go to the directory* **lib->main.dart** *file*)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4hk9kj33wpfpxw7mcyqd.png)

###Step 2: Android Virtual Device Manager

Now, go to drop-menu **Tools and chose AVD Manager**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/07whwtq9wlnvadg6z94k.png)

###Step 3: Create Virtual Device

You will get a pop-up window like this one and there go for **"+ Create Virtual Device.."** *in the left down corner*.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qjt13uhlezztm41oynai.png)

###Step 4: Choose category and virtual device

Again you will get a new one pop-up window and now is to you to choose *device definition*

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hdc5c24wegfxmuzs4k1x.png)

You have category:
1. TV
2. Phone
3. WearOS
4. Tablet
5. Automotive

You probably need to choose the Phone category, but that depends on you and your project.

Go for the Phone category and choose one phone that you want.

###Step 5: System Images

Now we need to choose System Image for our device.
> Android System Images are just versions of Android that you can run on your computer. [More about that](https://teamtreehouse.com/community/what-is-the-android-system-images-and-what-are-we-using-them-for)

Download one of these System Images and click *Next*

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ani0om848o4pjrpyh1bm.png)

###Step 6: Android Virtual Device

Then, finish step you can change the name of your device.
For example: *Nexus 5 API 30 - tutorial*- but this isn't needed and you can leave just *Nexus 5 API 30*

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/b2rxqxp8qx8nfxp3y5rp.png)

###**Click Finish**

###Step 7: Launch Android Virtual Device

Now you can launch this AVD in the emulator. Click that. And it will show you a phone, maybe you need to wait for a few seconds but be patient. And if it's your first time to launch this AVD you maybe got some errors, if so please comment below which errors you get.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e4bol42l75bln25fjapf.png)

After you launch this AVD in the emulator, go to drop-menu and choose (mobile) and also choose **main.dart** 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mhh4o0lz5k2szb3l188i.png)

###Last step: Run 'main.dart' (Shift+F10)

Run it. It can take a few seconds/minutes. Be patient. After that this **main.dart** code will be run on your virtual device.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3i0b649stu39e7hwf49o.png)


That's it. After a few seconds, it will show you *main.dart* application on your virtual device. **Congratulations**.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0xozdq2tiuq661udnpf6.png)


Thanks for reading, I hope you learn something new. If you get any errors feel free to comment in the section below.

Also, if you can check my first post [Say 'Hi' to Flutter](https://dev.to/derva/say-hi-to-fluttter-3lke)

@derva