Reputation: 41
when i add dependency to pubspec.yaml files ,in some dependency i get error ,i tried many to resolve it but i can't able to resolve it.
getting this error when using image picker dependency i tried
flutter clean
restart the pc
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)
Upvotes: 0
Views: 419
Reputation: 389
Possible solutions to what might occur:
flutter pub get
after adding dependencyProbably it is not documented that you have to add following permission to Android manifest file:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
Sometimes it might be needed to clean cache and run the project again by using flutter clean && flutter run
command on terminal.
Upvotes: 1