VScode调试Flutter
VScode如果想要在android模拟器上调试的话,需要先打开一个android的模拟器。我们可以从android studio中打开,然后再打开VScode即可。
如果打开了模拟器之后,VScode右下角还是显示no device的话,我们可以先命令行运行 flutter doctor检测一下问题所在,如果是SDK的问题,会显示
[?] Android toolchain - develop for Android devices
? Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
这是因为找不到SDK所致,如果已经下载了SDK 那么只需要添加一个环境变量即可
再次输入 flutter doctor检测 如果发现证书问题的话
则需要在终端下输入 flutter doctor --android-licenses即可