当前位置: 首页 > 知识库问答 >
问题:

未处理的异常:MissingPluginException(在通道testfairy上找不到方法日志的实现)

郤瀚
2023-03-14

我正在尝试构建Android应用程序,但收到一个错误MissingPluginException(在channel testfairy上找不到方法log的实现):

E/flutter ( 8121): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method initialize on channel dexterous.com/flutter/local_notifications)
E/flutter ( 8121): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7)
E/flutter ( 8121): <asynchronous suspension>
E/flutter ( 8121): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
E/flutter ( 8121): #2      AndroidFlutterLocalNotificationsPlugin.initialize (package:flutter_local_notifications/src/platform_flutter_local_notifications.dart:67:27)
E/flutter ( 8121): #3      FlutterLocalNotificationsPlugin.initialize (package:flutter_local_notifications/src/flutter_local_notifications_plugin.dart:97:13)
E/flutter ( 8121): #4      NotificationHelper.initNotifications (package:boxview_mobile_flutter/services/notification_helper.dart:23:37)
E/flutter ( 8121): #5      new Routes (package:boxview_mobile_flutter/routes.dart:49:26)
E/flutter ( 8121): #6      main (package:boxview_mobile_flutter/main.dart:4:7)
E/flutter ( 8121): #7      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:231:25)
E/flutter ( 8121): #8      _rootRun (dart:async/zone.dart:1190:13)
E/flutter ( 8121): #9      _CustomZone.run (dart:async/zone.dart:1093:19)
E/flutter ( 8121): #10     _runZoned (dart:async/zone.dart:1630:10)
E/flutter ( 8121): #11     runZonedGuarded (dart:async/zone.dart:1618:12)
E/flutter ( 8121): #12     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:223:5)
E/flutter ( 8121): #13     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:301:19)
E/flutter ( 8121): #14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

TestFairy插件的当前版本:TestFairy:^2.0。1颤振(通道稳定,1.22.2)Dart版本2.10。2.此外,我还添加了analysis\u选项。yaml

analyzer:
  enable-experiment:
    - non-nullable

我使用命令flatterrun--enable experiment=non-nullable--no sound null safety运行应用程序。

如何解决此错误?

共有1个答案

温翔宇
2023-03-14

@阿基夫为这个问题指出了正确的方向。事实上,这是由于本地_通知插件。通过将颤振切换到beta通道(颤振1.23.0-18.1.pre•通道beta),我成功地解决了这个问题。

 类似资料: