0

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

  1. flutter clean

  2. restart the pc

  3. reinstall the app
[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)
3
  • Can you mention which version of Flutter and ImagePicker are you using? Commented May 10, 2020 at 10:29
  • Flutter 1.12.13+hotfix.8 Commented May 10, 2020 at 10:32
  • image_picker: ^0.6.6+1 Commented May 10, 2020 at 10:32

1 Answer 1

1

Possible solutions to what might occur:

  • Pay attention to indentation in your pubspec.yaml file.
  • Make sure that you don't have any error on dependency version.
  • Make sure that you run flutter pub get after adding dependency
  • Probably 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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.