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

MissingPluginException(在通道颤振_inapp上找不到方法initConnection的实现)

顾正初
2023-03-14

未处理的异常:MissingPluginException(在channel Flatter_inapp上找不到方法initConnection的实现)。当我在android上使用Flatter in-app purchase插件时,会出现MissingPluginException异常。在iOS上,它运行得很好

当我运行或调试应用程序时,会出现以下错误:

E/flutter ( 7718): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method initConnection on channel flutter_inapp)
E/flutter ( 7718): #0      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:157
E/flutter ( 7718): <asynchronous suspension>
E/flutter ( 7718): #1      MethodChannel.invokeMethod
package:flutter/…/services/platform_channel.dart:332
E/flutter ( 7718): #2      FlutterInappPurchase.initConnection
package:flutter_inapp_purchase/flutter_inapp_purchase.dart:85
E/flutter ( 7718): <asynchronous suspension>
E/flutter ( 7718): #3      PaymentService.initConnection
package:social_app/services/payment_service.dart:98
E/flutter ( 7718): #4      _CourseTabState.fetchCarevanAcademy
package:social_app/…/course_tab/course_tab.dart:96
E/flutter ( 7718): <asynchronous suspension>
E/flutter ( 7718): #5      _CourseTabState.initState
package:social_app/…/course_tab/course_tab.dart:38
E/flutter ( 7718): #6      StatefulElement._firstBuild
package:flutter/…/widgets/framework.dart:4765
E/flutter ( 7718): #7      ComponentElement.mount
package:flutter/…/widgets/framework.dart:4601
E/flutter ( 7718): #8      Element.inflateWidget
package:flutter/…/widgets/framework.dart:3569
E/flutter ( 7718): #9      MultiChildRenderObjectElement.mount
package:flutter/…/widgets/framework.dart:6236
E/flutter ( 7718): #10     Element.inflateWidget
package:flutter/…/widgets/framework.dart:3569
E/flutter ( 7718): #11     Element.updateChild
package:flutter/…/widgets/framework.dart:3327
E/flutter ( 7718): #12     ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4652
E/flutter ( 7718): #13     Element.rebuild
package:flutter/…/widgets/framework.dart:4343
E/flutter ( 7718): #14     ComponentElement._firstBuild
package:flutter/…/widgets/framework.dart:4606
E/flutter ( 7718): #15     ComponentElement.mount
package:flutter/…/widgets/framework.dart:4601
E/flutter ( 7718): #16     Element.inflateWidget
package:flutter/…/widgets/framework.dart:3569
E/flutter ( 7718): #17     Element.updateChild
package:flutter/…/widgets/framework.dart:3327
E/flutter ( 7718): #18     ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4652
E/flutter ( 7718): #19     Element.rebuild
package:flutter/…/widgets/framework.dart:4343
E/flutter ( 7718): #20     ComponentElement._firstBuild
package:flutter/…/widgets/framework.dart:4606
E/flutter ( 7718): #21     ComponentElement.mount
package:flutter/…/widgets/framework.dart:4601
E/flutter ( 7718): #22     Element.inflateWidget
package:flutter/…/widgets/framework.dart:3569
E/flutter ( 7718): #23     Element.updateChild
package:flutter/…/widgets/framework.dart:3327
E/flutter ( 7718): #24     ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4652
E/flutter ( 7718): #25     Element.rebuild
package:flutter/…/widgets/framework.dart:4343
E/flutter ( 7718): #26     ComponentElement._firstBuild
package:flutter/…/widgets/framework.dart:4606
E/flutter ( 7718): #27     ComponentElement.mount
package:flutter/…/widgets/framework.dart:4601
E/flutter ( 7718): #28     Element.inflateWidget
package:flutter/…/widgets/framework.dart:3569
E/flutter ( 7718): #29     MultiChildRenderObjectElement.mount
package:flutter/…/widgets/framework.dart:6236
E/flutter ( 7718): #30     Element.inflateWidget
package:flutter/…/widgets/framework.dart:3569
    

共有1个答案

张晔
2023-03-14

关闭应用程序并执行flatter run命令。

 类似资料: