Closed Akash136 closed 3 years ago
I am facing the same issue can someone please help us out? I have added updated library version ^1.0.0 it give same above classcastexception in my flutterActivity as below,
Caused by: java.lang.ClassCastException: com.example.flutter_app.MainActivity cannot be cast to io.flutter.embedding.android.FlutterActivity
at com.amolg.flutterbarcodescanner.FlutterBarcodeScannerPlugin.registerWith(FlutterBarcodeScannerPlugin.java:87)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:48)
GeneratedPluginRegistrant.java: 48 : FlutterBarcodeScannerPlugin.registerWith(registry.registrarFor("com.amolg.flutterbarcodescanner.FlutterBarcodeScannerPlugin"));
But everything works fine when I downgrade the library(as in ^0.1.5+2) to below 1.0.0 version then I didn't face any such crashing which I don't prefer to downgrade the library. Thanks in advance.
same here
I followed these instructions https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects and it solved that problem.
Is anyone still facing this issue?
This can be resolved by upgrading the flutter.
If possible please update that the issue is fixed or not as I'm unable to reproduce this one, if this issue persists so this can be taken into high priority.
Thanks
I followed these instructions https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects and it solved that problem.
Thanks! This guide solved it for me as well!
With Flutter 2.0 and flutter_barcode_scanner : 2.0.0 this wont be there.
Closing this now, feel free to open a new issue.
I want to use qrcode scanner in my app but when i included this library in pubsec.yaml and restarted my app its startcrashing before and following is my Log! Please Revert As Soon As Possible!