NoSuchMethodError: The getter 'inputs' was called on null.

I get this message :

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

so, my build environment:

  • [2.0.0-edge.be6309690fd60284a87f3258a740c7c30efb1092 ] Dart SDK Version (dart --version)

  • [build_runner ^0.10.0 ] What package(s) from this repo you are using, and the version (i.e. build_runner 0.7.12)

  • [Just demo at https://flutter.io/json/ ] What builder(s) you are using (or writing yourself). Try to give a short summary of what they do.

  • [ MacOS] Whether you are using Windows, MacOSX, or Linux (if applicable)

  • [ iOS Simulator] Whether you are using Chrome, Safari, Firefox, Edge (if applicable)

  • [dependencies:
    cupertino_icons: ^0.1.2
    transparent_image: ^0.1.0
    pull_to_refresh: ^1.1.5
    json_annotation: ^1.0.0

dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^0.10.0
json_serializable: ^1.0.0
] Any other packages or constraints we should know about

error message:

NoSuchMethodError: The getter 'inputs' was called on null.
Receiver: null
Tried calling: inputs
dart:core Object.noSuchMethod
/Users/zhangxianqiangmacbook/.pub-cache/hosted/pub.flutter-io.cn/build_runner_core-0.3.1+5/lib/src/asset_graph/serialization.dart 58:20 _AssetGraphDeserializer.deserialize
package:build_runner_core/src/asset_graph/graph.dart 42:48 new AssetGraph.deserialize
package:build_runner_core/src/generate/build_definition.dart 209:38 _Loader._tryReadCachedAssetGraph.
package:build_runner_core/src/logging/logging.dart 25:30 logTimedAsync
package:build_runner_core/src/generate/build_definition.dart 207:12 _Loader._tryReadCachedAssetGraph
package:build_runner_core/src/generate/build_definition.dart 79:28 _Loader.prepareWorkspace
package:build_runner_core/src/generate/build_definition.dart 64:50 BuildDefinition.prepareWorkspace
package:build_runner_core/src/generate/build_impl.dart 106:49 BuildImpl.create
package:build_runner_core/src/generate/build_runner.dart 31:37 BuildRunner.create
package:build_runner/src/generate/build.dart 105:35 build
package:build_runner/src/entrypoint/build.dart 28:24 BuildCommand.run
package:args/command_runner.dart 194:27 CommandRunner.runCommand
package:args/command_runner.dart 109:29 CommandRunner.run.
dart:async new Future.sync
package:args/command_runner.dart 109:11 CommandRunner.run
package:build_runner/src/entrypoint/run.dart 22:31 run
.dart_tool/build/entrypoint/build.dart 18:22 main

pub finished with exit code 1

 

解决方法:deleted the /.dart_tool , then everything is okay

转载于:https://www.cnblogs.com/yuwensong/p/10344373.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值