gpt4 book ai didi

Flutter 构建失败 : NoSuchMethodError: The getter 'futureDynamicType' was called on null

转载 作者:行者123 更新时间:2023-12-04 01:00:36 27 4
gpt4 key购买 nike

我刚刚进入一个基于 flutter 的现有项目,在尝试构建它时,我遇到了这个错误。

其他同事没有这个问题。

在构建运行器脚本的运行过程中,它因以下错误而失败:

You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues


NoSuchMethodError: The getter 'futureDynamicType' was called on null.
Receiver: null
Tried calling: futureDynamicType
dart:core Object.noSuchMethod
package:analyzer/src/dart/element/element.dart 7053:40 LibraryElementImpl.createLoadLibraryFunctionForLibrary
package:analyzer/src/dart/element/element.dart 6903:9 LibraryElementImpl.createLoadLibraryFunction
package:analyzer/src/summary/resynthesize.dart 363:24 SummaryResynthesizer.getLibraryElement.<fn>
dart:collection _LinkedHashMapMixin.putIfAbsent
package:analyzer/src/summary/resynthesize.dart 351:36 SummaryResynthesizer.getLibraryElement
package:analyzer/src/summary/resynthesize.dart 414:20 SummaryResynthesizer._buildTypeProvider
package:analyzer/src/summary/resynthesize.dart 202:5 new SummaryResynthesizer
package:analyzer/src/summary/package_bundle_reader.dart 154:9 new StoreBasedSummaryResynthesizer
package:analyzer/src/dart/analysis/library_context.dart 100:27 new LibraryContext
package:analyzer/src/dart/analysis/driver.dart 1626:29 AnalysisDriver._createLibraryContext
package:analyzer/src/dart/analysis/driver.dart 1570:26 AnalysisDriver._computeUnitElement
package:analyzer/src/dart/analysis/driver.dart 1170:34 AnalysisDriver.performWork
package:analyzer/src/dart/analysis/driver.dart 2188:24 AnalysisDriverScheduler._run
package:analyzer/src/dart/analysis/driver.dart 2118:5 AnalysisDriverScheduler.start
package:build_resolvers/src/analysis_driver.dart 54:13 analysisDriver
package:build_resolvers/src/resolver.dart 138:18 new AnalyzerResolvers
package:build_runner_core/src/generate/options.dart 132:19 BuildOptions.create
package:build_runner/src/generate/build.dart 84:36 build
package:build_runner/src/entrypoint/build.dart 28:24 BuildCommand.run
package:args/command_runner.dart 197:27 CommandRunner.runCommand
package:args/command_runner.dart 112:25 CommandRunner.run.<fn>
dart:async new Future.sync
package:args/command_runner.dart 112:14 CommandRunner.run
package:build_runner/src/entrypoint/run.dart 24:31 run
.dart_tool/build/entrypoint/build.dart 22:22 main

pub finished with exit code 1

知道它会导致什么吗?我没有接触该项目。

最佳答案

此问题已在此处解决https://github.com/dart-lang/build/issues/2482

随便跑

flutter pub upgrade

关于Flutter 构建失败 : NoSuchMethodError: The getter 'futureDynamicType' was called on null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58482722/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com