Skip to content

MissingPluginException(No implementation found for method share on channel plugins.flutter.io/share) #12264

Closed

Description

@arnoldparge

Steps to Reproduce

Added share plugin

Logs

caught exception:

MissingPluginException(No implementation found for method share on channel plugins.flutter.io/share)

Flutter Doctor

[√] Flutter (on Microsoft Windows [Version 10.0.15063], locale en-IN, channel unknown)
    • Flutter at C:\Users\username\flutter\flutter
    • Framework revision 1c372c6803 (4 weeks ago), 2017-08-31 15:54:45 -0700
    • Engine revision f9e00a7c72
    • Tools Dart version 1.25.0-dev.11.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    • Android SDK at C:\Program Files (x86)\Android\android-sdk
    • Platform android-25, build-tools 25.0.3
    • ANDROID_HOME = C:\Program Files (x86)\Android\android-sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[√] Android Studio (version 2.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[√] IntelliJ IDEA Community Edition (version 2017.2)
    • Flutter plugin version 17.0
    • Dart plugin version 172.3968.27

[√] Connected devices
    • GT I9152 • **** • android-arm • Android 4.2.2 (API 17)

For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.

Activity

  1. added this to the milestone on May 21, 2018
  2. Hixie commented on May 21, 2018

    @Hixie
    Contributor
  3. mravn-google commented on May 22, 2018

    @mravn-google
    Contributor

    The share plugin works as intended. The error probably appears because the addition of the plugin was followed by hot restart or hot reload rather than full restart. This means the plugin's platform-specific code is not built into the app.

    Work around: stop the app and restart it after adding a plugin.

    Documentation PR: flutter/website#1038

  4. marksheekey commented on Feb 7, 2019

    @marksheekey

    I get this error, even after a complete restart.

  5. AkamineAiko commented on Mar 13, 2019

    @AkamineAiko

    I get this error after complete restart too.

  6. Navil commented on Apr 30, 2019

    @Navil

    I have the same error. I tried restarting and even reinstalling the application.
    Edit: "flutter clean" fixed the issue

  7. ksharm95 commented on Jul 5, 2019

    @ksharm95

    I have the same issue .
    I tried remove application completely then flutter clean then reinstall
    solved

  8. added a commit that references this issue on Sep 13, 2019
  9. added a commit that references this issue on Sep 30, 2019
  10. mykolamor commented on Dec 24, 2019

    @mykolamor

    Still cannot run latest version of the plugin

  11. CedYF commented on Feb 3, 2020

    @CedYF

    This also breaks even after restarting and re-installing my app for me.

  12. Onus31 commented on Jun 4, 2020

    @Onus31

    MissingPluginException(No implementation found for method shareFile on channel plugins.flutter.io/share)

  13. ospar0829 commented on Jul 23, 2020

    @ospar0829

    This also breaks even after flutter clean, restarting and re-installing the app

  14. wandriputra commented on Dec 13, 2020

    @wandriputra

    flutter clean not work for me

  15. Daniel-Sogbey commented on Jan 1, 2021

    @Daniel-Sogbey

    run :

    flutter clean

    after that run:

    flutter pub get

  16. Daniel-Sogbey commented on Jan 1, 2021

    @Daniel-Sogbey

    flutter clean not work for me

    run :

    flutter clean

    after that run:

    flutter pub get

  17. Daniel-Sogbey commented on Jan 1, 2021

    @Daniel-Sogbey

    This also breaks even after flutter clean, restarting and re-installing the app

    run :

    flutter clean

    after that run:

    flutter pub get

  18. Daniel-Sogbey commented on Jan 1, 2021

    @Daniel-Sogbey

    This also breaks even after restarting and re-installing my app for me.
    run :

    flutter clean

    after that run:

    flutter pub get

  19. Daniel-Sogbey commented on Jan 1, 2021

    @Daniel-Sogbey

    I get this error after complete restart too.

    run :

    flutter clean

    after that run:

    flutter pub get

  20. foxsofter commented on Feb 8, 2021

    @foxsofter
      @Override
      public void onAttachedToActivity(ActivityPluginBinding binding) {
        share.setActivity(binding.getActivity());
      }

    Change to the following code and it will work

      @Override
      public void onAttachedToActivity(ActivityPluginBinding binding) {
        share.setActivity(binding.getActivity());
        methodChannel.setMethodCallHandler(handler);
      }
  21. Spinthecode commented on Mar 15, 2021

    @Spinthecode
      @Override
      public void onAttachedToActivity(ActivityPluginBinding binding) {
        share.setActivity(binding.getActivity());
      }

    Change to the following code and it will work

      @Override
      public void onAttachedToActivity(ActivityPluginBinding binding) {
        share.setActivity(binding.getActivity());
        methodChannel.setMethodCallHandler(handler);
      }

    In what file please?

  22. foxsofter commented on Mar 15, 2021

    @foxsofter
      @Override
      public void onAttachedToActivity(ActivityPluginBinding binding) {
        share.setActivity(binding.getActivity());
      }

    Change to the following code and it will work

      @Override
      public void onAttachedToActivity(ActivityPluginBinding binding) {
        share.setActivity(binding.getActivity());
        methodChannel.setMethodCallHandler(handler);
      }

    In what file please?

    https://github.com/flutter/plugins/blob/f7096d7d7be9883149a1fb6cebfaa6ff85fb01a5/packages/share/android/src/main/java/io/flutter/plugins/share/SharePlugin.java#L42

  23. gagan781992 commented on Jun 21, 2021

    @gagan781992

    I have no such file in our project I am in the same error. Which is my thinking everything is right. what should I do now

  24. lordvidex commented on Jun 28, 2021

    @lordvidex

    Do not use any hack or touch the MainActivity.(kt/java) file. Mostly, I noticed issues only from the Android side.. So,

    1. Delete android/
    2. run flutter create . This will generate normal gradle and kotlin setup that works if you are on the latest stable flutter version
    3. run flutter clean && flutter pub get
    4. run the app

    My Flutter Doctor Summary:
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 2.2.0, on macOS 11.4 20F71 darwin-x64, locale en-US)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    [✓] Xcode - develop for iOS and macOS
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.1)
    [✓] IntelliJ IDEA Ultimate Edition (version 2021.1.2)
    [✓] VS Code (version 1.57.1)
    [✓] Connected device (2 available)

    • No issues found!

  25. github-actions commented on Jul 30, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  26. locked as resolved and limited conversation to collaborators on Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    packageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions