Closed Harishwarrior closed 2 years ago
It also happens on macOS:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale en-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.1)
[✓] IntelliJ IDEA Community Edition (version 2021.3)
[✓] VS Code (version 1.66.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
Got it to work after manually solving the signalled issues in the de/mintware/barcode_scan/ActivityHelper.kt
, de/mintware/barcode_scan/ChannelHandler.kt
, and de/mintware/barcode_scan/RequestCameraPermissionHandler.kt
files.
Fixing means removing the ? operator.
Got it to work after manually solving the signalled issues in the
de/mintware/barcode_scan/ActivityHelper.kt
,de/mintware/barcode_scan/ChannelHandler.kt
, andde/mintware/barcode_scan/RequestCameraPermissionHandler.kt
files. Fixing means removing the ? operator.
Can you elaborate on how you fixed it?
The causing errors are really here for you:
e: C:\Users\Harish\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\barcode_scan2-4.2.0\android\src\main\kotlin\de\mintware\barcode_scan\ActivityHelper.kt: (81, 58): Type mismatch: inferred type is Array<CapturedType(out String)>? but Array<(out) String!> was expected
e: C:\Users\Harish\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\barcode_scan2-4.2.0\android\src\main\kotlin\de\mintware\barcode_scan\ActivityHelper.kt: (81, 71): Type mismatch: inferred type is IntArray? but IntArray was expected
e: C:\Users\Harish\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\barcode_scan2-4.2.0\android\src\main\kotlin\de\mintware\barcode_scan\ChannelHandler.kt: (64, 39): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
The error tells you what was provided and what is expected. So you remove the trailing ? operator on these and provide what it expects. Then the other errors will go away because they complain about function signatures.
The long term fix will probably come from the package maintainer. This is just a fix to get your project building.
The causing errors are really here for you:
e: C:\Users\Harish\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\barcode_scan2-4.2.0\android\src\main\kotlin\de\mintware\barcode_scan\ActivityHelper.kt: (81, 58): Type mismatch: inferred type is Array<CapturedType(out String)>? but Array<(out) String!> was expected e: C:\Users\Harish\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\barcode_scan2-4.2.0\android\src\main\kotlin\de\mintware\barcode_scan\ActivityHelper.kt: (81, 71): Type mismatch: inferred type is IntArray? but IntArray was expected e: C:\Users\Harish\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\barcode_scan2-4.2.0\android\src\main\kotlin\de\mintware\barcode_scan\ChannelHandler.kt: (64, 39): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected
The error tells you what was provided and what is expected. So you remove the trailing ? operator on these and provide what it expects. Then the other errors will go away because they complain about function signatures.
The long term fix will probably come from the package maintainer. This is just a fix to get your project building.
Thanks
@Harishwarrior If you solved this issue, can you upload files which had edited?
@Harishwarrior If you solved this issue, can you upload files which had edited?
I'll work on this tomorrow. Will update.
I've created a PR here: https://github.com/mono0926/barcode_scan2/pull/50
You can use my repository for now, enter in your pubspec.yaml
:
barcode_scan2:
git:
url: https://github.com/robinbonnes/barcode_scan2
I've created a PR here: https://github.com/mono0926/barcode_scan2/pull/50
You can use my repository for now, enter in your
pubspec.yaml
:barcode_scan2: git: url: https://github.com/robinbonnes/barcode_scan2
Thanks man
Describe the bug The project throws an error after upgrading to flutter 3.0
To Reproduce
Logs
Additional context
Possible cause