I am implementing image_picker in my app. That is not showing any warning or message but when I run it in Android simulator it shows me an error in console:
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)
E/flutter ( 5074): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
E/flutter ( 5074): <asynchronous suspension>
E/flutter ( 5074): #1 ImagePicker.pickImage (package:image_picker/image_picker.dart:53:40)
E/flutter ( 5074): <asynchronous suspension>
I solved my problem by simply run following command:
flutter clean
After this my Android simulator start working correctly.
When you add a new dependency and you get this error, you should stop the app and run it again from cold. Hot restart will not work.
First, make sure you clean your flutter project
flutter clean
then in Android studio, File > Invalidate and caches restart
flutter run
Just uninstall app from your simulator and clean project by flutter clean
and then flutter run
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