I/flutter (16811): PlatformException(error, Attempt to invoke virtual method 'android.content.ContentResolver android.app.Activity.getContentResolver()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ContentResolver android.app.Activity.getContentResolver()' on a null object reference
I/flutter (16811): at com.azihsoyn.flutter.mlkit.MlkitPlugin.onMethodCall(MlkitPlugin.java:140)
I/flutter (16811): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
I/flutter (16811): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:84)
I/flutter (16811): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:865)
I/flutter (16811): at android.os.MessageQueue.nativePollOnce(Native Method)
I/flutter (16811): at android.os.MessageQueue.next(MessageQueue.java:335)
I/flutter (16811): at android.os.Looper.loop(Looper.java:206)
I/flutter (16811): at android.app.ActivityThread.main(ActivityThread.java:8506)
I/flutter (16811): at java.lang.reflect.Method.invoke(Native Method)
I/flutter (16811): at com.android.internal.os.RuntimeInit$MethodAndArgs
error detecting text after pick an image
I/flutter (16811): PlatformException(error, Attempt to invoke virtual method 'android.content.ContentResolver android.app.Activity.getContentResolver()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ContentResolver android.app.Activity.getContentResolver()' on a null object reference I/flutter (16811): at com.azihsoyn.flutter.mlkit.MlkitPlugin.onMethodCall(MlkitPlugin.java:140) I/flutter (16811): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233) I/flutter (16811): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:84) I/flutter (16811): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:865) I/flutter (16811): at android.os.MessageQueue.nativePollOnce(Native Method) I/flutter (16811): at android.os.MessageQueue.next(MessageQueue.java:335) I/flutter (16811): at android.os.Looper.loop(Looper.java:206) I/flutter (16811): at android.app.ActivityThread.main(ActivityThread.java:8506) I/flutter (16811): at java.lang.reflect.Method.invoke(Native Method) I/flutter (16811): at com.android.internal.os.RuntimeInit$MethodAndArgs