首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:指定的语言版本太高了。最受支持的语言版本是2.13

错误:指定的语言版本太高了。最受支持的语言版本是2.13
EN

Stack Overflow用户
提问于 2021-10-12 17:47:39
回答 2查看 752关注 0票数 0

出于某种原因,我将信用评级从2.5.2降至2.2.3。

现在:Flutter version 2.2.3Dart version 2.13.4

在pubspec.yaml中:

代码语言:javascript
运行
复制
environment:
  sdk: ">=2.12.0 <3.0.0"

当我运行该项目时,它可以工作,但我从控制台获得以下消息:

代码语言:javascript
运行
复制
Failed to precompile devtools:devtools:
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/shelf_proxy-1.0.1/lib/shelf_proxy.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/http.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/client.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/exception.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/request.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/response.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/streamed_request.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/base_client.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/base_request.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
^
/C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/http-0.13.4/lib/src/base_response.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.13.
// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
^

Here是这样说的:"flutter clean,然后运行这个项目。“它不能解决问题。

我怎么才能解决这个问题?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-10-12 18:26:03

解决方案1

删除pubspec.lock文件。

那就跑,

代码语言:javascript
运行
复制
flutter clean

代码语言:javascript
运行
复制
flutter pub get

解决方案2

代码语言:javascript
运行
复制
flutter pub cache repair

免责声明:当运行上面的命令,有一个非常快的互联网连接,或准备好浪费几个小时的生产时间。(这将重新下载安装在pc上的每个软件包,我指的是每个软件包的所有版本)

票数 1
EN

Stack Overflow用户

发布于 2022-05-17 13:39:42

我试过以上所有的方法,但没有任何帮助。

然后,我决定确保自己是在最新的Android上(无论如何,我仍然保持着非常最新的状态),然后更新我使用的几个插件。我安装了Android补丁,为了安全起见,我检查了更新,它显示了一个现在可用的更新,所以我安装了它。

然后我确保我所有的插件都是最新的。他们已经是,因为我最近也更新了他们。

在做完这件事之后,我现在可以运行devtools了..。终于来了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69544908

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档