为颤振更新 dart sdk [英] update dart sdk for flutter

查看:17
本文介绍了为颤振更新 dart sdk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在颤振中使用 dart SDK >= 2.2.0.但我目前使用的 Flutter 版本是 2.1.2

I would like to use dart SDK >= 2.2.0 with flutter. But my current version used BY Flutter is 2.1.2

flutter --version
Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (2 months ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

我尝试独立安装2.2.0版本,我成功了:

I tried to install the 2.2.0 version independently and I succeed :

dart --version
Dart VM version: 2.2.0 (Tue Feb 26 15:04:32 2019 +0100) on "macos_x64"

但是,正如您在上面看到的,Flutter 不使用此版本.我试图用我独立安装的版本替换颤振使用的 dart-sdk 文件(flutter/bin/cache/dart-sdk),但是当我尝试之后运行 Flutter,我遇到了快照问题,所以我将原来的 dart-sdk 文件夹放回了 flutter 目录中.

However, Flutter doesn't use this version as you can see above. I tried to replace files of the dart-sdk used by flutter (flutter/bin/cache/dart-sdk) by the version that I installed independently, but when I try to run Flutter after that I have a snapshot problem so I have put back the original dart-sdk folder in the flutter directory.

您有什么想法可以更新吗?

Do you have any ideas how can I update it?

PS:我最近(10 天前)从这里下载了 Flutter:https:///flutter.dev/docs/get-started/install/macos

PS: I downloaded flutter very recently (10 days ago) from here: https://flutter.dev/docs/get-started/install/macos

推荐答案

这可能是因为您使用的是 channel stable,这是四个更新频道中最安全的版本(频道列在这里)

It might be due to the fact you are on channel stable which is the most secure builds of the four channels to get updated (channels are listed here)

如果您更想尝试新功能而不必冒险构建不良版本,我建议 channel beta:

If you are a bit more curious to try out the new features without having to risk bad builds I advocate channel beta:

每个月,我们都会挑选上个月左右的最佳"开发版本,并将其升级为测试版.这些构建已经通过我们的代码实验室进行了测试.

Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.

其中stable频道有这样的描述:

where the stable channel has this description:

当我们认为我们有一个特别好的构建时,我们会将其推广到稳定频道.我们打算每季度或多或少地这样做,但这可能会有所不同.我们建议您将此渠道用于所有生产应用程序版本.我们可能会针对高优先级错误将修补程序发送到稳定频道,尽管我们的意图是很少这样做.

When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.

您可以通过在终端中运行以下命令将频道更改为指向 beta:flutter channel beta 后跟 flutter upgrade 以确保您获得了此特定分支的最新版本.

You can change the channel to point at beta by running this command in your terminal: flutter channel beta followed by flutter upgrade to ensure you have got the last release for this particular branch.

让我知道这对您的情况有何影响.

Let me know how this affect your situation.

这篇关于为颤振更新 dart sdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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