繁体   English   中英

VScode是否需要更新Dart SDK?

[英]Is it required to update Dart SDK for VScode?

当我从 VScode 检查 dart 和 flutter 版本时,它显示

Dart VM 版本:“windows_x64”上的 2.7.0(2019 年 12 月 6 日星期五 16:26:51 +0100)

Flutter 2.0.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision adc687823a (12 days ago) • 2021-04-16 09:40:20 -0700 Engine • revision b09f014e96 Tools • Dart 2.12.3

但是当我运行 VScode 时,它会提示我更新 Dart SDK

Dart SDK 版本 2.12.4 可用(您有 2.7.0)。 Dart 代码的某些功能可能无法与旧的 SDK 一起正常工作。

同时dart sdk页面说

As of Flutter 1.21, the Flutter SDK includes the full Dart SDK. 因此,如果您安装了 Flutter,您可能不需要显式下载 Dart SDK。 如果以下任何一项为真,请考虑下载 Dart SDK:

  • 您不使用 Flutter。
  • 您使用的是 Flutter 的 1.21 之前的版本。
  • 您想减少磁盘空间要求或下载时间,而您的用例不需要 Flutter。 例如,您可能有一个需要 Dart 但不需要 Flutter 的持续集成 (CI) 设置。

那么我应该更新 dart sdk 吗? But as it says if you have Flutter installed, you might not need to explicitly download the Dart SDK , it' a litle bit confused., because I have Flutter installed.

您不再需要单独下载 dart SDK。 将其移除(至少将其移开),然后执行flutter upgrade 如果“dart --version”仍然有效,那么您就很成功了,尽管您可能需要删除任何手动设置的 dart SDK 路径。 I'm pretty sure all the supported IDE extensions for Dart pick up the proper "buried within flutter" paths for the Dart SDK.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM