89

I am trying to use the plugin

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

I have put "www.google.com" just for debugging purposes.

The error I get is MissingPluginException :

E/flutter ( 8299): MissingPluginException(No implementation found for method launch on channel plugins.flutter.io/url_launcher)
E/flutter ( 8299): #0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:278:7)
E/flutter ( 8299): <asynchronous suspension>
E/flutter ( 8299): #1      launch (package:url_launcher/url_launcher.dart:47:19)
E/flutter ( 8299): #2      _launchURL (file:///Users/matejsimunic/Work/dart/suhail/lib/main.dart:834:9)
E/flutter ( 8299): <asynchronous suspension>
E/flutter ( 8299): #3      _TripDetailBodyState.build.<anonymous closure> (file:///Users/matejsimunic/Work/dart/suhail/lib/main.dart:818:19)
E/flutter ( 8299): #4      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:494:14)
E/flutter ( 8299): #5      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:549:30)
E/flutter ( 8299): #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter ( 8299): #7      TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
E/flutter ( 8299): #8      TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:94:7)
E/flutter ( 8299): #9      PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:315:9)
E/flutter ( 8299): #10     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
E/flutter ( 8299): #11     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
E/flutter ( 8299): #12     _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:143:19)
E/flutter ( 8299): #13     _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
E/flutter ( 8299): #14     _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
E/flutter ( 8299): #15     _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
E/flutter ( 8299): #16     _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
E/flutter ( 8299): #17     _invoke1 (dart:ui/hooks.dart:134:13)
E/flutter ( 8299): #18     _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)

restarting the app from ide doesn't work.

Paresh Mangukiya
  • 37,512
  • 17
  • 201
  • 182
Tree
  • 24,909
  • 17
  • 69
  • 91
  • I had that problem when using image_picker: ^0.6.7+4 with flutter_facebook_login: ^3.0.0 I had to remove Facebook support from my app – Lauro Kozovits Aug 03 '20 at 22:12

10 Answers10

232

If you are using hot restart or hot reload, it won't do the trick. Since Flutter has to inject plugin dependencies into the platform-specific parts of your app, hot restart/hot reload is not enough to trigger the injection. Check this issue for more.

Close the app and execute flutter run command.

Mohit Nainwal
  • 2,436
  • 1
  • 6
  • 6
39
flutter clean

Inside the console did the job as stated here

Tree
  • 24,909
  • 17
  • 69
  • 91
13

I faced this Error when using Url_launcher package. just had to stop and run the app, issue got solved

aihamhasan
  • 249
  • 5
  • 8
10

Simply Run these commands..

either--

Flutter clean

or

Invalidate Caches/Restart

developerSumit
  • 950
  • 11
  • 16
5

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.

Dharmik Thakkar
  • 1,112
  • 7
  • 17
  • 1
    Thanks brother, you saved me, I was also struggling with same problem facebook dependency, I was amazed why the plugins are not working while they are working on the other app correctly, great!!!! – Faisal Nadeem Dec 22 '20 at 10:42
2

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

Paresh Mangukiya
  • 37,512
  • 17
  • 201
  • 182
1

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

Ricardo
  • 1,690
  • 23
  • 28
1

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

Uninstalling and installing the app works for me

kodeKhalifa
  • 81
  • 3
  • 6
-2

just open terminal and

step1 flutter clean
step2 flutter pub get
step3 flutter run

Its worked for me, Thanks have a good day .

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 26 '22 at 23:33