MissingPluginException while using plugin for flutter

前端 未结 7 2136
忘掉有多难
忘掉有多难 2020-12-06 09:01

I am trying to use the plugin

_launchURL(url) async {
  await launch(\"www.google.com\");
}

I have put \"www.google.com\" just for debuggi

相关标签:
7条回答
  • 2020-12-06 09:30

    Had problem while using flutter toast dependency and dependencies like facebook_login. I followed these steps and resolved it:

    1. First, u need to test whether these toast and shared preference dependencies are causing problems or some other dependencies cause the problem.
    2. For testing that, u need to create a new seprate flutter project having the same flutter toast and shared preference dependency and check now if u r able to get toasts or not.
    3. If u r getting toast so there is no problem with ur toast dependency.
    4. The problem might be in ur one of the social media dependency.

    In my case, I followed the above steps and found that problem was in facebook dependency. Finally, I found that I did not provide details of my app at facebook developer console. So implemented that and my app was fine.

    0 讨论(0)
  • 2020-12-06 09:30

    In my case it was for the cached_network_image plugin , I have removed cached_network_image from pubspec.yaml and replaced the implementation with Image.network and the problem has disappeared

    0 讨论(0)
  • 2020-12-06 09:39

    In my case, I had this problem with the image picker, then I followed the documentation and used an emulator with api 29+, it didn't work before because I was using an emulator with api 28 https://pub.dev/packages/image_picker

    0 讨论(0)
  • 2020-12-06 09:39

    fear not, this is normal. For me it happens every time I add a new plugin to my Flutter project, and then forget to stop my application and restart it. Either that, or you might be working from the command line and forgot to run flutter pub get.

    Usually what happens in workflow is:

    • I’m already running an app with flutter run.
    • I add a new plugin to my project.
    • My IDE runs flutter pub get for me.
    • I add features of the new plugin in my app.
    • I hit r or R on the flutter run screen to reload the app.
    • I get an error message like this one because I forgot that I needed to stop the flutter run process and restart it:

    So again, this Flutter error message usually isn’t a big deal, it just means you’ve forgotten/missed something in this process.

    Solution is

    Stop the flutter run process and start it up again restart within flutter run

    0 讨论(0)
  • 2020-12-06 09:47
    flutter clean
    

    Inside the console did the job as stated here

    0 讨论(0)
  • 2020-12-06 09:47

    Simply Run these commands..

    either--

    Flutter clean

    or

    Invalidate Caches/Restart

    0 讨论(0)
提交回复
热议问题