I already added connectivity plugin on my pubspec.yaml
.
connectivity: ^0.4.6
But still getting this error:
E/flutter ( 4789): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method check on channel plugins.flutter.io/connectivity)
E/flutter ( 4789): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
E/flutter ( 4789):
E/flutter ( 4789): #1 Connectivity.checkConnectivity (package:connectivity/connectivity.dart:73:47)
error connectivity is from this line :
Future<ConnectivityResult> checkConnectivity() async {
final String result = await methodChannel.invokeMethod<String>('check');
return _parseConnectivityResult(result);
}
and I never modified this package, But still get this error no matter what version of this plugin that I use. I hope anyone can help me to solve this error, thank you. Sorry for my bad English.
The MissingPluginException issues are raised due to incorrect registration of plugins.
I got the MissingPlugin error. I found quite some posts about the error. But my case is a bit different. First, my project runs fine in simulator, the error only raises when I run my release app on physical Android. Second, this error is not just related to one package.
This plugin creates isolates that auto marshal plugin work back to the main isolate, without risking a runtime exception that base flutter isolates will normally throw. Run only the source code of the heavy process, that you are allowed to run in a base flutter isolate, by only using the flutter & dart sdk apis directly.
The GeneratedPluginRegistrant files are generated by Flutter build/run tooling. So if you execute flutter build apk or flutter run, it should work. We are working on improving the user experience here, cf. #14560.
This error mostly occurs when you try to Hot Reload or Hot Restart after just adding new package to your pubspec.yaml
.
Just stop the running project(app) and then freshly run it again. So that the added package(which contains the implementations) also pushed to the device
Flutter clean on terminal, stop the build and running again worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With