本文介绍了错误:指定的语言版本太高.支持的最高语言版本是 2.8.在 android studio 中我该如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

切换到分支 'stable' flutter channel 后

After switched to branch 'stable' flutter channel

以下是构建问题.

错误:指定的语言版本太高.支持的最高语言版本为 2.8.

Error: The specified language version is too high. The highest supported language version is 2.8.

output: ../../third_party/dart/third_party/pkg/collection/lib/src/utils.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.8.
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
^
../../third_party/dart/third_party/pkg/collection/lib/src/wrappers.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.8.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../third_party/dart/third_party/pkg/collection/lib/src/functions.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.8.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^

推荐答案

为什么?

发生这种情况是因为您指定的语言版本高于在 .dart_tool 目录(特别是在 package_config.json 文件中)中声明的版本.

Why?

This happens, because the your specified language version is higher than the one declared in the .dart_tool directory (specifically in the package_config.json file).

您可以手动删除文件夹,也可以让 Flutter 工具为您完成.从终端运行 flutter clean 或者,如果使用 Android Studio,请转到 Tools ->颤动 ->Flutter Clean.

You can either delete the folder manually or let Flutter tools do it for you. Run flutter clean from the terminal or, if using Android Studio, go to Tools -> Flutter -> Flutter Clean.

这篇关于错误:指定的语言版本太高.支持的最高语言版本是 2.8.在 android studio 中我该如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 07:55