我正在尝试使用admob将我的flutter应用程序货币化,但由于出现一些错误而失败了。我不是我想念的。我使用了**firebase_admob 0.6.1+1* *插件,并使用了它的示例。
我还有一个问题,我们如何通过编程将我的设备添加为测试设备。甚至有可能扑扑吗?
错误:
E/flutter (29099): [ERROR:flutter/shell/common/shell.cc(182)] Dart Error: Unhandled exception:
E/flutter (29099): MissingPluginException(No implementation found for method loadBannerAd on channel plugins.flutter.io/firebase_admob)
E/flutter (29099): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:278:7)
E/flutter (29099): <asynchronous suspension>
E/flutter (29099): #1 _invokeBooleanMethod (package:firebase_admob/firebase_admob.dart:500:61)
E/flutter (29099): <asynchronous suspension>
E/flutter (29099): #2 BannerAd.load (package:firebase_admob/firebase_admob.dart:255:12)
E/flutter (29099): #3 _MyAppState.build (file:///F:/project/gameviren/lib/main.dart:62:9)
E/flutter (29099): #4 StatefulElement.build (package:flutter/src/widgets/framework.dart:3765:27)
E/flutter (29099): #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3677:15)
E/flutter (29099): #6 Element.rebuild (package:flutter/src/widgets/framework.dart:3530:5)
E/flutter (29099): #7 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2272:33)
E/flutter (29099): #8 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:660:20)
E/flutter (29099): #9 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
E/flutter (29099): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
E/flutter (29099): #11 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
E/flutter (29099): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
E/flutter (29099): #13 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
E/flutter (29099): #14 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
E/flutter (29099): #15 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
E/flutter (29099): #16 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
E/flutter (29099): [ERROR:flutter/shell/common/shell.cc(182)] Dart Error: Unhandled exception:
E/flutter (29099): MissingPluginException(No implementation found for method showAd on channel plugins.flutter.io/firebase_admob)
E/flutter (29099): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:278:7)
E/flutter (29099): <asynchronous suspension>
E/flutter (29099): #1 _invokeBooleanMethod (package:firebase_admob/firebase_admob.dart:500:61)
E/flutter (29099): <asynchronous suspension>
E/flutter (29099): #2 MobileAd.show (package:firebase_admob/firebase_admob.dart:212:12)
E/flutter (29099): #3 _MyAppState.build (file:///F:/project/gameviren/lib/main.dart:63:9)
E/flutter (29099): #4 StatefulElement.build (package:flutter/src/widgets/framework.dart:3765:27)
E/flutter (29099): #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3677:15)
E/flutter (29099): #6 Element.rebuild (package:flutter/src/widgets/framework.dart:3530:5)
E/flutter (29099): #7 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2272:33)
E/flutter (29099): #8 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:660:20)
E/flutter (29099): #9 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
E/flutter (29099): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
E/flutter (29099): #11 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)