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

MissingPluginException(No implementation found for method listen on channel JAVA_TO_FLUTTER) #17

Open
jasper2007111 opened this issue May 10, 2019 · 2 comments

Comments

@jasper2007111
Copy link

会报如下错误:

flutter: ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
flutter: The following MissingPluginException was thrown while activating platform stream on channel
flutter: JAVA_TO_FLUTTER:
flutter: MissingPluginException(No implementation found for method listen on channel JAVA_TO_FLUTTER)
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:300:7)
flutter:
flutter: #1 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:490:29)
flutter:
flutter: #6 ShareSDK.listenNativeEvent (package:sharesdk/sharesdk_interface.dart:16:10)

@moblarry
Copy link
Contributor

会报如下错误:

有具体接口吗?或者具体实现什么方法报错?

@songshitong
Copy link

应该是example在initState中调用了ShareSDK.listenNativeEvent(),这应该是Android才有的方法,运行在iOS会报错,加个判断就能正常运行了

if (TargetPlatform.android == defaultTargetPlatform) {
      ShareSDK.listenNativeEvent();
    }

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

3 participants