运行 Flutter Web 中的任何内容时控制台出错(Vs 代码)

Errors in console when running anything in Flutter Web (Vs Code)

编辑:这些消息仅在 Visual Studio 代码的调试控制台中弹出。从终端 运行ning 时不会出现此问题。 Flutter 扩展可能存在一些问题。

每当我在 Flutter Web 中 运行 任何内容时,我都会在我的控制台中收到错误消息,并且在每次 Reload/Hot 热重启后它们都会再次出现,即使是新创建的项目也是如此。他们在这里:

Error handling 'checkPlatformOverride' custom request: _flutter.listViews: (-32601) Unknown method "_flutter.listViews".
Error handling 'checkBrightnessOverride' custom request: _flutter.listViews: (-32601) Unknown method "_flutter.listViews".
Error handling 'checkIsWidgetCreationTracked' custom request: _flutter.listViews: (-32601) Unknown method "_flutter.listViews".
Error handling 'serviceExtension' custom request: _flutter.listViews: (-32601) Unknown method "_flutter.listViews".

知道是什么原因造成的吗?这些应用程序运行良好,但一段时间后它在控制台中占用了大量 space。

这是我的 flutter doctor -v 输出,供参考(几分钟前切换到 master 看看是否能解决问题):

[✓] Flutter (Channel master, 2.3.0-1.0.pre.243, on macOS 11.3 20E232 darwin-arm, locale en-FR)
    • Flutter version 2.3.0-1.0.pre.243 at /Users/lemomar/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cc8d78ec7 (34 minutes ago), 2021-05-07 05:57:27 -0700
    • Engine revision f57e986aa8
    • Dart version 2.14.0 (build 2.14.0-74.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/lemomar/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.56.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.22.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
    ! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)

问题已于 2021 年 6 月 4 日星期五解决。