最新的 Flutter 升级导致错误:“DillSetterBuilder”不是“SourceMemberBuilderImpl”类型的子类型?在类型转换中

Zzz*_*Zzz 14 xcode asynchronous compiler-errors dart flutter

升级之前,一切都运行得很好。这是我升级后收到的完整错误:

type 'DillSetterBuilder' is not a subtype of type 'SourceMemberBuilderImpl?' in type cast
#0      SourceLibraryBuilder.checkMemberConflicts.<anonymous closure> (package:front_end/src/fasta/source/source_library_builder.dart:998:22)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:574:13)
#2      Scope.forEachLocalSetter (package:front_end/src/fasta/scope.dart:424:14)
#3      SourceLibraryBuilder.checkMemberConflicts (package:front_end/src/fasta/source/source_library_builder.dart:974:11)
#4      SourceLibraryBuilder.build (package:front_end/src/fasta/source/source_library_builder.dart:1057:5)
#5      IncrementalCompiler.compileExpression.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:1817:20)
#6      IncrementalCompiler.compileExpression.<anonymous closure> 
[#7-#59...]

the Dart compiler exited unexpectedly.
the Dart compiler exited unexpectedly.
Run Code Online (Sandbox Code Playgroud)

小智 -1

如果在cmd中运行以下命令,问题就解决了。

dart --enable-analytics
Run Code Online (Sandbox Code Playgroud)