Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

flutter - 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?

question from:https://stackoverflow.com/questions/66068639/how-to-add-android-emulators-to-vs-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...