How To Run Existing Flutter App In VSCode On Android Emulator & Fix Error Failed Connect 60 Seconds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in this tutorial I'm going to show you how to run an existing flutter application on Android emulator in vs code now in this tutorial I already have flutter SDK and Android Studio installed and my flutter development environment setup if you don't know how to do that there's a more complete flatter tutorial on this channel you can find it in the description of this video but if you simply want to run an existing flutter project in your Visual Studio code and run it on Android emulator this tutorial is for you so I'm going to go ahead and get started first let's go ahead and open your vs code editor and go to extensions type Dart and click on the first search result and make sure Dart extension is installed I already have it installed in my visual studio code so I'm going to go ahead and also type flutter click on the first result and install the flutter extension as well now to open an existing flutter project in vs code go ahead and go to file open folder and in the my hard drive projects are on C drive in projects folder I'm going to open my flutter projects folder and inside that folder I'm going to click on the project hello world and click select folder doing this will open an existing flutter project in vs code so this is going to set up a flutter project in my vs code now what you want to do is click on this button in the lower right corner and go to start flutter emulator see this notification launching flutter emulator and you can resize it and place it right over there one common error you're going to experience writing flutter for the first time is after waiting for flutter emulator to connect you get this failed to launch flutter emulator emulator did not connect after 60 Seconds now that happens because you need to wipe data and you do that by going to Android Studio clicking on these three dots go to virtual device manager select your flutter emulator you previously set up here and in these three dots go to wipe data and then confirm by clicking the yes button now you can close this up and we're going to go back to our Visual Studio code now go back to that button in the lower right corner where it says no device and click Start flutter emulator in a drop down we're going to be launching flutter emulator and you'll actually notice that it's running a little different after we selected the wipe data from Android Studio that's because it's actually connected to our app and in just a moment you'll see the emulator connecting to its home screen all right so at this point what you want to do is locate your main.dart file in Project Explorer and right click on it and select run without debugging then you're gonna have to wait a while for your flutter application to build and eventually it will just show up in Android emulator and to test if it's actually working I'm pressing the button here and as you can see the counter number is increasing okay guys so this is the basic process to running an existing flutter app in vs code on an Android emulator and I hope that this is helping someone out there
Info
Channel: Ghost Together
Views: 32,328
Rating: undefined out of 5
Keywords: vscode, run, flutter, android, emulator, fix, error, can't, connect, 60 seconds, existing, open, visual studio code
Id: EzMuzyg_Iw0
Channel Id: undefined
Length: 3min 33sec (213 seconds)
Published: Wed Dec 28 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.