我希望你能引导我朝某个方向前进,因为我完全迷路了。今天我在 vs 代码上打开了我的项目,它只是永远停留在初始化颤振上。所以我通过控制台上的flutter run启动项目。我收到此错误消息。
我还应该指出,无论我尝试运行什么项目,这个问题都仍然存在。
我尝试更改 gradle 包装器属性文件中的 gradle 版本 zip 文件,还重新下载项目的当前版本并将其粘贴到 dists /.gradle/wrapper/文件夹中,但问题仍然存在
/C:/flutter/packages/flutter_tools/lib/src/build_runner/devfs_web.dart:97:7: Error: The non-abstract class 'WebAssetServer' is missing implementations for these members:
- AssetReader.metadataContents
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class WebAssetServer implements AssetReader {
^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/dwds-5.1.0/lib/src/readers/asset_reader.dart:18:18: Context: 'AssetReader.metadataContents' is defined here.
Future<String> metadataContents(String serverPath);
^^^^^^^^^^^^^^^^
/C:/flutter/packages/flutter_tools/lib/src/test/coverage_collector.dart:69:16: Error: The argument type 'Future<Map<String, Map<int, int>>>' can't be assigned to the parameter type 'Map<String, Map<int, int>>'.
- 'Future' is from 'dart:async'.
- 'Map' is from 'dart:core'.
_addHitmap(coverage.createHitmap(data['coverage'] as List<Map<String, dynamic>>));
^
/C:/flutter/packages/flutter_tools/lib/src/test/coverage_collector.dart:101:16: Error: The argument type 'Future<Map<String, Map<int, int>>>' can't be assigned to
the parameter type 'Map<String, Map<int, int>>'.
- 'Future' is from 'dart:async'.
- 'Map' is from 'dart:core'.
_addHitmap(coverage.createHitmap(data['coverage'] as List<Map<String, dynamic>>));
^
Error: Unable to create dart snapshot for flutter tool.