Skip to content
New issue

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

报错:'Logger.onLevelChanged' is defined here. #63

Open
caoshouling opened this issue Aug 16, 2023 · 4 comments
Open

报错:'Logger.onLevelChanged' is defined here. #63

caoshouling opened this issue Aug 16, 2023 · 4 comments

Comments

@caoshouling
Copy link

caoshouling commented Aug 16, 2023

PS D:\workspace\mobileSpace\flutter_githubclient_app> flutter packages pub run json_model
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Failed to build json_model:json_model:
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/build_runner_core-7.2.2/lib/src/logging/build_for_input_logger.dart:13:7: Error: The non-abstract class 'BuildForInputLogger' is missing implementations for these members:

  • Logger.onLevelChanged
    Try to either
  • provide an implementation,
  • mark the class as abstract, or
  • provide a 'noSuchMethod' implementation.

class BuildForInputLogger implements Logger {
^^^^^^^^^^^^^^^^^^^
/C:/Users/Administrator/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/logging-1.2.0/lib/src/logger.dart:162:22: Context: 'Logger.onLevelChanged' is defined here.
Stream<Level?> get onLevelChanged {
^^^^^^^^^^^^^^

@Stronglittleboy
Copy link

我解决了这个问题,删除pubspec.lock文件,然后dart pub upgrade,应该就解决了

@JieHaoCai
Copy link

我也遇到了这个问题

@JieHaoCai
Copy link

我解决了这个问题,删除pubspec.lock文件,然后dart pub upgrade,应该就解决了

不行

@pingia
Copy link

pingia commented Oct 28, 2023

I resolved the same error by following the below link:
dart-lang/build#3519 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants