flutter - 如何将 Android 模拟器添加到 VS 代码?
问题描述
当我使用flutter run
命令时,它显示以下消息:
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"):
这也是 flutter emulators
命令的结果:
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
是否可以将 Android 模拟器添加到flutter run
chrome 和 edge 浏览器旁边的命令列表中?
解决方案
你应该:
- 检索可用模拟器的列表
flutter emulators
- 启动模拟器
flutter emulators --launch Nexus_5x
然后,当您运行时,flutter run
您应该会看到新的 android 模拟器。
推荐阅读
- javascript - 如何从数组中仅按对象 id 获取数据
- sql - 获取值更改的最近日期
- c - 与编译时或预处理期间相比,为什么 Android Studio 在运行时为 sizeof(long) 提供不同的值
- powershell - 加密其他客户使用的 Powershell 脚本的密码
- android - $.ajax Phonegap apk 构建现在无法正常工作
- javascript - 在动态图像加载时刷新 owl-carousel2
- swift - 创建 VPN 连接
- amazon-s3 - S3 存储桶策略访问被拒绝
- reactjs - 预设文件不允许导出对象,只能导出功能。反应原生
- ios - 中断 UIView 转换