We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I run flutter pub run build_runner build to generate JsonSerializable and retrofit_generator, but get a bug report.
flutter pub run build_runner build
dependencies: json_annotation: ^3.0.1 retrofit: ^1.3.4 dio: ^3.0.8 dev_dependencies: build_runner: ^1.7.3 retrofit_generator: ^1.3.4+2 json_serializable: ^3.3.0
(before run flutter packages get)
flutter packages get
Unhandled exception: NoSuchMethodError: Closure call with mismatched arguments: function 'MutablePackageTree.allPackages' Receiver: Closure: (_SyncIterator<Package>) => bool Tried calling: MutablePackageTree.allPackages() Found: MutablePackageTree.allPackages(_SyncIterator<Package>) => bool #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) #1 _SyncIterable.iterator (dart:core-patch/core_patch.dart:117:45) #2 new SimplePackageConfig (package:package_config/src/package_config_impl.dart:26:36) #3 parsePackageConfigJson (package:package_config/src/package_config_json.dart:213:10) #4 parsePackageConfigBytes (package:package_config/src/package_config_json.dart:45:10) #5 readPackageConfigJsonFile (package:package_config/src/package_config_io.dart:117:10) <asynchronous suspension> #6 findPackagConfigInDirectory (package:package_config/src/discovery.dart:109:18) <asynchronous suspension> #7 findPackageConfig (package:package_config/src/discovery.dart:44:31) <asynchronous suspension> #8 findPackageConfig (package:package_config/package_config.dart:114:5) #9 PackageGraph.forPath (package:build_runner_core/src/package_graph/package_graph.dart:74:15) #10 PackageGraph.forThisPackage (package:build_runner_core/src/package_graph/package_graph.dart:110:20) #11 main (file:///C:/Users/Windows%2010/AppData/Roaming/Pub/Cache/hosted/pub.flutter-io.cn/build_runner-1.10.0/bin/build_runner.dart:27:49) #12 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32) #13 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12) pub finished with exit code 255
(after run flutter packages get)
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 pub finished with exit code 1
The text was updated successfully, but these errors were encountered:
I just found an related issues :)
https://github.com/dart-lang/package_config/issues/85
Sorry, something went wrong.
Same issue here, did you solve it? (Seems that people in the link does not?)
@fzyzcjy Just flutter clean and flutter packages get, and rerun flutter run.
flutter clean
flutter run
Same issue here, did you solve it? (i didn't find any solution here.)
See the related issue https://github.com/dart-lang/package_config/issues/85.
If you manually delete your .dart_tool/build directory that should work I think.
.dart_tool/build
No branches or pull requests
I run
flutter pub run build_runner build
to generate JsonSerializable and retrofit_generator, but get a bug report.Dart VM version: 2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "windows_x64"
build_runner: ^1.7.3
retrofit_generator: ^1.3.4+2
json_serializable: ^3.3.0
Windows 10 1803
Chrome 81.0.4044.138 x86
(before run
flutter packages get
)(after run
flutter packages get
)The text was updated successfully, but these errors were encountered: