I downgrade Flutter to 2.2.3 from 2.5.2 for a reason.
Now: Flutter version 2.2.3
and Dart version 2.13.4
in pubspec.yaml:
environment:
sdk: ">=2.12.0 <3.0.0"
When I run the project it works but I get this message from the console:
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 is what it says: "flutter clean
, then run the project." it doesn't fix the problem.
How can I fix this?
CodePudding user response:
Solution 1:
Delete pubspec.lock
file.
Then run ,
flutter clean
and
flutter pub get
Solution 2:
flutter pub cache repair