美文网首页
Flutter - 开发常见问题

Flutter - 开发常见问题

作者: 神灬渐入嘉靜 | 来源:发表于2020-07-21 17:28 被阅读0次

    build_runner 报错

    NoSuchMethodError: Closure call with mismatched arguments: function 'MutablePackageTree.allPackages'
    Receiver: Closure: (_SyncIterator<Package>) => bool
    Tried calling: MutablePackageTree.allPackages()
    Found: MutablePackageTree.allPackages(_SyncIterator<Package>) => bool
    dart:core                                                              _SyncIterable.iterator
    package:package_config/src/package_config_impl.dart 26:36              new SimplePackageConfig
    package:package_config/src/package_config_json.dart 213:10             parsePackageConfigJson
    package:package_config/src/package_config_json.dart 45:10              parsePackageConfigBytes
    package:package_config/src/package_config_io.dart 117:10               readPackageConfigJsonFile
    package:package_config/src/discovery.dart 109:18                       findPackagConfigInDirectory
    package:package_config/src/discovery.dart 44:31                        findPackageConfig
    package:package_config/package_config.dart 114:5                       findPackageConfig
    package:build_runner_core/src/package_graph/package_graph.dart 74:15   PackageGraph.forPath
    package:build_runner_core/src/package_graph/package_graph.dart 110:20  PackageGraph.forThisPackage
    package:build_runner/src/entrypoint/run.dart 22:64                     run
    .dart_tool/build/entrypoint/build.dart 26:22                           main
    

    解决: flutter clean

    相关文章

      网友评论

          本文标题:Flutter - 开发常见问题

          本文链接:https://www.haomeiwen.com/subject/zwkwkktx.html