android-studio - 错误:指定的语言版本太高。支持的最高语言版本是 2.8。在android studio中我该如何解决?
问题描述
切换到分支“稳定”颤振通道后
以下是构建问题。
错误:指定的语言版本太高。支持的最高语言版本是 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
文件中)。
解决方案
您可以手动删除该文件夹,也可以让 Flutter 工具为您完成。从终端运行flutter clean
,或者,如果使用 Android Studio,请转到Tools -> Flutter -> Flutter Clean
.
推荐阅读
- azure - 在本地运行 azure function 或 webjob,但只运行一次
- vue.js - 分配给null时会出现打字错误吗?
- c# - 有没有办法使用多行标签更改不同行的字体?
- typescript - 所有 React 组件道具在 Typescript 中是否应该始终是只读的?
- android - 仅从嵌套的 RecyclerView 中获取所有值获取最后一行项目
- r - R formattable() 防止删除具有相似名称的列
- javascript - 开玩笑测试没有正确重置模拟值
- vba - 如何限制表单域的字符数
- r - 函数中返回错误以查找对数正态进行计算
- ios - 如何在 viewdidload() 中使用回调函数?