如何为Flutter模拟器的VS Code设置设备 [英] How to set up devices for VS Code for a Flutter emulator

查看:479
本文介绍了如何为Flutter模拟器的VS Code设置设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用VS Code作为Flutter开发的编辑器,但我不知道如何使模拟器运行。我已经在Ubuntu 17.10上安装了VS Code。


我按照


I'd like to use VS Code as my editor for Flutter development, but I don't know how to get the emulator going. I've installed VS Code on Ubuntu 17.10.

I followed the first half of instructions as outlined on the Flutter: Get Started page (Create new app). Then I ran into trouble in the second half:

Run the app

  1. Make sure a target device is selected in the lower, right-hand corner of VS Code
  2. Press the F5 button on the keyboard, or invoke Debug>Start Debugging
  3. Wait for the app to launch
  4. If everything works, after the app has been built, you should see your starter app on your device or simulator:

The problem is that in that bottom right-hand corner is "No Devices."

How do I connect a device? I can't seem to find instructions anywhere.

解决方案

From version 2.13.0 of Dart Code, emulators can be launched directly from within Code but This feature relies on support from the Flutter tools which means it will only show emulators when using a very recent Flutter SDK. Flutter’s master channel already has this change, but it may take a little longer to filter through to the dev and beta channels.

I tested this feature and worked very well on flutter version 0.5.6-pre.61 (master channel)

这篇关于如何为Flutter模拟器的VS Code设置设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆