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)
Step 2: Android Virtual Device Manager
Now, go to drop-menu Tools and chose AVD Manager
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.
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
You have category:
- TV
- Phone
- WearOS
- Tablet
- 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
Download one of these System Images and click Next
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
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.
After you launch this AVD in the emulator, go to drop-menu and choose (mobile) and also choose main.dart
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.
That's it. After a few seconds, it will show you main.dart application on your virtual device. Congratulations.
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
Top comments (0)