由于我完全迷路了,所以我希望您可以向某个方向指引我。今天,我在vs代码上打开了我的项目,但它永远停留在初始化flutter上。因此,我通过在控制台上运行Flutter启动了项目。而且我收到此错误消息。
我还应该指出,无论我尝试运行的项目如何,这个问题仍然存在。
我尝试在gradle包装器属性文件中更改gradle版本zip文件,还重新下载了该项目的当前版本并将其粘贴到dists /.gradle/wrapper/folder中,但是问题仍然存在
/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.
答案 0 :(得分:0)
如果您已将Flutter升级到最新版本,则很可能您的某些软件包可能不再更新。
开始检查pubspec.yaml中的每个软件包,并检查是否需要更新其中的任何一个。
您还需要检查文档中是否有任何重大更改。