我想使用 Visual Studio Code 作为 Flutter 开发的编辑器,但我不知道如何启动模拟器。我已经在 Ubuntu 17.10 上安装了 Visual Studio Code (巧妙的土豚)。
我遵循了 Flutter: Get Started 中概述的前半部分说明。页面(创建新应用)。然后下半场就遇到了麻烦:
Run the app
- Make sure a target device is selected in the lower, right-hand corner of VS Code
- Press the F5 button on the keyboard, or invoke Debug>Start Debugging
- Wait for the app to launch
- If everything works, after the app has been built, you should see your starter app on your device or simulator:
问题在于右下角是“无设备”。
如何连接设备?我似乎在任何地方都找不到说明。
最佳答案
来自 version 2.13.0
of Dart Code ,模拟器可以直接从 Visual Studio Code 中启动,但此功能依赖于 Flutter 工具的支持,这意味着它只会在使用 最新的 Flutter SDK 时显示模拟器. Flutter 的 master channel 已经有了这个变化,但是可能需要更长的时间才能过滤到 development 和 beta channel 。
我测试了这个功能,它在 Flutter 版本 0.5.6-pre.61(主 channel )上运行良好。
关于visual-studio-code - 如何为 Flutter 模拟器的 Visual Studio Code 设置设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49280884/