【发布时间】:2021-12-01 07:23:59
【问题描述】:
出于某种原因,我将 Flutter 从 2.5.2 降级到 2.2.3。
现在:Flutter version 2.2.3 和 Dart version 2.13.4
在 pubspec.yaml 中:
environment:
sdk: ">=2.12.0 <3.0.0"
当我运行项目时,它可以工作,但我从控制台收到此消息:
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,然后运行项目。”它不能解决问题。
我该如何解决这个问题?
【问题讨论】:
-
@MichalKarbownik 没有。仔细阅读问题,尤其是最后几行。