flutter 升级 dart sdk:
1、下载dart 官网 对应的版本,这次下载的是Beat版本;
https://dart.dev/tools/sdk/archive
2、删除了原来的dart sdk;
3、解压并复制刚下载下来的sdk;
4、配置环境变量:
export PATH=/Users/houzhibin/Downloads/software/flutter/bin/cache/dart-sdk/bin
localhost:~ houzhibin$ vim ~/.bash_profile localhost:~ houzhibin$ localhost:~ houzhibin$ source ~/.bash_profile localhost:~ houzhibin$ localhost:~ houzhibin$ localhost:~ houzhibin$ Dart --version Dart SDK version: 2.12.0-259.12.beta (beta) (Fri Feb 12 11:00:34 2021 +0100) on "macos_x64"
5、结果flutter不能运行 任何命令了,怎么解决?
Can't load Kernel binary: Invalid kernel binary format version.
将原来低版本的dart sdk 放到另外一个地方,指定目录;让指定项目的flutter的目录,所以就有了上图,问题依然没有解决。
问题依旧,还原都不可以了:
Flutter device daemon #3 exited (exit code 253), stderr: Can't load Kernel binary: Invalid kernel binary format version.
6、本地的vim 也提示找不到命令了?