ashish Arora
ashish Arora

Reputation: 41

getting error when using the dependency in flutter

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)

Upvotes: 0

Views: 419

Answers (1)

Baki Kocak
Baki Kocak

Reputation: 389

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.

Upvotes: 1

Related Questions