0

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?

zeed
  • 285
  • 1
  • 5
  • 18
  • Does this answer your question? [Error: The specified language version is too high. The highest supported language version is 2.8. in android studio how can I fix it?](https://stackoverflow.com/questions/63182015/error-the-specified-language-version-is-too-high-the-highest-supported-languag) – Michal Karbownik Dec 11 '21 at 16:04
  • @MichalKarbownik No. Read the question carefully, especially the last lines. – zeed Dec 11 '21 at 16:30

2 Answers2

1

Solution 1:

Delete pubspec.lock file.

Then run ,

flutter clean

and

flutter pub get

Solution 2:

flutter pub cache repair

Disclaimer: When running the command above, have a really fast internet connection or be ready to lose hours of productive time. ( This will redownload every package installed on your pc, and I mean each and all of the versions of each package)

NirmalCode
  • 2,140
  • 1
  • 14
  • 19
0

I tried all the above and nothing helped.

I then decided to make sure I was on the very latest Android Studio (I stay pretty current anyway) and then update the few Plugins that I use. I installed the Android Studio patch, and checked for updates after just to be safe and it showed an update now available so I installed it.

Then I made sure all my plugins were up to date. They already were, as I had updated them recently too.

After doing this I was now able to run devtools... finally.

BrianDev
  • 57
  • 7