E/flutter (15907): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(already_active, Image picker is already active, null)
E/flutter (15907): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (15907): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (15907): <asynchronous suspension>
E/flutter (15907): #2 ImagePicker.pickImage (package:image_picker/image_picker.dart:59:40)
How can I resolve this image picker dependency error?
Uninstall the app then install again, if issue still persist maybe you are overriding any method on MainActivity with using super, like for me adding super onActivity result helped, which I found from this link.
Ref link https://github.com/flutter/flutter/issues/19103#issuecomment-412647536
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
super.onActivityResult(requestCode, resultCode, data); // had to add this line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With