Here is my pubspec.yaml
When I run pub get without image picker, it works.
name: project1
description: A new Flutter application.
publish_to:
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
camera:
image_picker: ^0.6.1+4
image_cropper:
path_provider:
path:
flutter_local_notifications: ^1.4.4+2
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
But when I include image_picker from latest version to 0.6.0 it shows the same error message
The plugin
flutter_plugin_android_lifecycle
doesn't have a main class defined in C:\Users\john\Documents\flutter_windows_1.17.1-stable\flutter.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-1.0.8\android\src\main\java\io\flutter\plugins\flutter_plugin_android_lifecycle\FlutterAndroidLifecyclePlugin.java or C:\Users\john\Documents\flutter_windows_1.17.1-stable\flutter.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-1.0.8\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_lifecycle
ormainClass
entry in the plugin's pubspec.yaml. If you are the author of this plugin, fix theandroidPackage
entry 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.
I tried running other projects w/o image_picker and they seem to work fine. I just can't install the image_picker.