Closed vkusenko closed 4 years ago
@vkusenko Try to bump up flutter app android compileSdkVersion
and targetSdkVersion
to 29 which is Android 10 and run the app.
I'll still be checking any possibility of reproducing this issue.
I ran a bare min example and it worked successfully for me.
minSdkVersion 16
targetSdkVersion 28
Nope, it doesn't work when pressing the "Cancel" button.
I assume the reason is that the field "pendingResult" is never actually set when cancelling (this would happen in "onMethodCall"), "onActivityResult" is being called and "pendingResult" is null.
Nope, sorry, scanning also fails with a nullpointer at
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference at com.amolg.flutterbarcodescanner.FlutterBarcodeScannerPlugin.onActivityResult(FlutterBarcodeScannerPlugin.java:157)
I'm using a github reference in the pubspec because otherwise, the app crashes on start up. See other related issues.
I'm running an Android 10. FlutterVersion = v1.12.13+hotfix.6
Edit: Tried switching to flutter beta channel with v1.13.6. No change.
@wurstnudl
Thanks for the details.
I am not able to reproduce this issue. But In flutter v1.12.13 there is a migration to new APIs is required. I've made the migration(which is a major change) and it will be available with the new release. I think let's try it in new version which is coming soon and see if this issue persists.
Thanks
V1.0.0 has been released
closing this, please feel free to reopen this if the issue persists
Had u find a solution to this issue ?
Caused by java.lang.NullPointerException Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference com.amolg.flutterbarcodescanner.FlutterBarcodeScannerPlugin.onActivityResult