Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Android emulators to VS code?

When I use flutter run command it shows the following message:

Multiple devices found:
Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.146
Edge (web)   • edge   • web-javascript • Microsoft Edge 86.0.622.51
[1]: Chrome (chrome)
[2]: Edge (edge)
Please choose one (To quit, press "q/Q"):

Also this is the result of flutter emulators command:

3 available emulators:

Nexus_5x       • Nexus_5x       • Google • android
Pixel_2_API_29 • Pixel 2 API 29 • Google • android
pixel_xl       • pixel_xl       • Google • android

To run an emulator, run 'flutter emulators --launch <emulator id>'.
To create a new emulator, run 'flutter emulators --create [--name xyz]'.

You can find more information on managing emulators at the links below:
  https://developer.android.com/studio/run/managing-avds
  https://developer.android.com/studio/command-line/avdmanager

Is it possible to add Android emulators to the list of flutter run command beside chrome and edge browsers?

like image 784
user3486308 Avatar asked Oct 19 '25 14:10

user3486308


2 Answers

You should:

  • Retrieve the list of the available emulators
flutter emulators
  • Launch the emulator
flutter emulators --launch Nexus_5x

Then when you run flutter run you should see your new android emulator.

like image 169
EncryptedSpirit Avatar answered Oct 22 '25 02:10

EncryptedSpirit


  • Download Android SDK and make initial setup.

  • Relaunch VSCode and clean the project:

    flutter clean
    
  • if this didn't help, try to update licences:

    flutter doctor --android-licenses
    
like image 33
Alex Kosyakov Avatar answered Oct 22 '25 04:10

Alex Kosyakov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!