azihsoyn / flutter_mlkit

A Flutter plugin to use the Firebase ML Kit.
MIT License
391 stars 90 forks source link

Attempt to invoke virtual method 'android.content.ContentResolver android.app.Activity.getContentResolver() #105

Open DivaRamadha opened 3 years ago

DivaRamadha commented 3 years ago

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