Build: NoSuchMethodError: Closure call with mismatched arguments: function 'MutablePackageTree.allPackages'

Created on 9 May 2020  Â·  1Comment  Â·  Source: dart-lang/build

Hello!
I have hit a bug in 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

My pubspec:

name: gohere
description: Go Here

version: 2.0.0-alpha6+60

environment:
  sdk: ">=2.6.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  gohere_common:
    #    path: ../common
    git: [email protected]:optimist.dev/gohere/common.git
  cupertino_icons: ^0.1.3
  http: ^0.12.1
  intl:
    git:
      url: [email protected]:sanekyy/intl.git
      ref: update-ruble-sign
  intl_translation: ^0.17.10
  url_launcher: ^5.4.5
  video_player:
    git:
      url: git://github.com/sanekyy/plugins.git
      ref: go-here
      path: packages/video_player/video_player
  esys_flutter_share: ^1.0.2
  shared_preferences: ^0.5.7+1
  pull_to_refresh: ^1.5.8
  floor: ^0.12.0
  firebase_core: ^0.4.4+3
  firebase_crashlytics: ^0.1.3+3
  firebase_analytics: ^5.0.11
  firebase_remote_config: ^0.3.0+3
  firebase_dynamic_links: ^0.5.0+11
  firebase_performance: ^0.3.1+8
  firebase_messaging: ^6.0.13
  amplitude_flutter: ^2.0.0
  rxdart: ^0.24.0
  provider: ^4.1.1
  built_value: ^7.1.0
  flutter_launcher_icons: ^0.7.5
  google_maps_flutter:
    git:
      url: git://github.com/otopba/plugins.git
      ref: gohere
      path: packages/google_maps_flutter/google_maps_flutter
  google_sign_in: ^4.4.4
  apple_sign_in: 0.1.0
  image_picker: ^0.6.6+1
  async: ^2.4.1
  geocoder: ^0.2.1
  kenburns:
    git:
      url: git://github.com/sanekyy/Flutter-KenBurns.git
  flutter_email_sender: ^3.0.1
  package_info: ^0.4.0+17
  indexed_list_view: ^1.0.8

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  build_runner: ^1.9.0
  built_value_generator: ^7.1.0
  floor_generator: ^0.12.0

dependency_overrides:
  video_player_platform_interface:
    git:
      url: git://github.com/sanekyy/plugins.git
      ref: go-here
      path: packages/video_player/video_player_platform_interface
  video_player_web:
    git:
      url: git://github.com/sanekyy/plugins.git
      ref: go-here
      path: packages/video_player/video_player_web
  intl:
    git:
      url: git://github.com/sanekyy/intl.git
      ref: update-ruble-sign

flutter:
  uses-material-design: true
  assets:
    - assets/

flutter_icons:
  image_path_ios: icon/full_icon.png
  image_path_android: icon/full_icon.png
  adaptive_icon_background: icon/background.png
  adaptive_icon_foreground: icon/full_icon.png
  android: true
  ios: true

Flutter doctor -v:

[✓] Flutter (Channel dev, 1.19.0-0.0.pre, on Mac OS X 10.15.4 19E287, locale en-RU)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.6)
[!] Android Studio (version 3.5)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.1 RC)
[✓] VS Code (version 1.44.2)
[✓] Connected device (3 available)

! Doctor found issues in 3 categories.
➜  client git:(master) ✗ flutter doctor -v
[✓] Flutter (Channel dev, 1.19.0-0.0.pre, on Mac OS X 10.15.4 19E287, locale en-RU)
    • Flutter version 1.19.0-0.0.pre at /Users/yuriy.dorofeev/flutter
    • Framework revision a849daf283 (2 days ago), 2020-05-07 18:59:02 -0700
    • Engine revision 3953c3ccd1
    • Dart version 2.9.0 (build 2.9.0-5.0.dev 4da5b40fb6)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/yuriy.dorofeev/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.9.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] Android Studio (version 3.5)
    • Android Studio at /Users/yuriy.dorofeev/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.6010548/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.1 RC)
    • IntelliJ at /Users/yuriy.dorofeev/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 42.0.4
    • Dart plugin version 193.5731

[✓] VS Code (version 1.44.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.9.1

[✓] Connected device (3 available)
    • ONEPLUS A6010 • ae52d68a   • android-arm64  • Android 10 (API 29)
    • Web Server    • web-server • web-javascript • Flutter Tools
    • Chrome        • chrome     • web-javascript • Google Chrome 81.0.4044.138

! Doctor found issues in 3 categories.

Most helpful comment

Oh.
flutter -clean solve the problem

>All comments

Oh.
flutter -clean solve the problem

Was this page helpful?
0 / 5 - 0 ratings