json_model icon indicating copy to clipboard operation
json_model copied to clipboard

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

Open caoshouling opened this issue 1 year ago • 4 comments

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 { ^^^^^^^^^^^^^^

caoshouling avatar Aug 16 '23 00:08 caoshouling

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

Stronglittleboy avatar Sep 01 '23 08:09 Stronglittleboy

我也遇到了这个问题

JieHaoCai avatar Oct 20 '23 09:10 JieHaoCai

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

不行

JieHaoCai avatar Oct 20 '23 09:10 JieHaoCai

I resolved the same error by following the below link: https://github.com/dart-lang/build/issues/3519#issuecomment-1722803465

pingia avatar Oct 28 '23 14:10 pingia