i tried everything i could to import image_picker and i find on various sites but couldn't get rid of this error :
import 'package:image_picker/image_picker.dart';
Target of URI doesn't exist: 'package:image_picker/image_picker.dart'. Try creating the file referenced by the URI, or Try using a URI for a file that does exis
already added the dependencies such as :
dependencies:
image_picker: ^0.8.4+8
Running "flutter pub get" it turns out to
OUTPUT:
The plugin
flutter_plugin_android_lifecycledoesn't have a main class defined in C:\Users\Iradukunda Didier\Documents\flutter_windows_2.8.1-stable\flutter.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.5\android\src\main\java\io\flutter\plugins\flutter_plugin_android_lifecycle\FlutterAndroidLifecyclePlugin.java or C:\Users\Iradukunda Didier\Documents\flutter_windows_2.8.1-stable\flutter.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.5\android\src\main\kotlin\io\flutter\plugins\flutter_plugin_android_lifecycle\FlutterAndroidLifecyclePlugin.kt. This is likely to due to an incorrectandroidPackage: io.flutter.plugins.flutter_plugin_android_lifecycleormainClassentry in the plugin's pubspec.yaml. If you are the author of this plugin, fix theandroidPackageentry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile. exit code 1
Run
flutter packages getinstead offlutter pub get. If it does not work, Re-start the Visual Studio Code afterflutter packages getSource: