nateshmbhat / card-scanner-flutter

A flutter package for Fast, Accurate and Secure Credit card & Debit card scanning
https://pub.dev/packages/card_scanner
GNU General Public License v3.0
113 stars 104 forks source link

not compiling in android , flutter #52

Open Div-47 opened 3 years ago

Div-47 commented 3 years ago

below is the issue

                                                         ^

e: /Users/geitpl/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.2/android/src/main/java/com/nateshmbhat/card_scanner/CardScannerCameraActivity.kt: (50, 26): Type mismatch: inferred type is CardScannerOptions? but CardScannerOptions was expected e: /Users/geitpl/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.2/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardScannerOptions.kt: (27, 44): Type mismatch: inferred type is ArrayList<String!>? but List was expected e: /Users/geitpl/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.2/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardScannerOptions.kt: (33, 45): Type mismatch: inferred type is ArrayList<String!>? but List was expected

FAILURE: Build failed with an exception.

ervinod commented 3 years ago

getting above error while compiling card_scanner: ^1.0.1-prerelease

compileSdkVersion 30 classpath 'com.android.tools.build:gradle:4.1.3' ext.kotlin_version = '1.4.21'

Faiza-Farooqui commented 3 years ago

I have faced the same issue

ervinod commented 3 years ago

I have faced the same issue

Use below version of card_scanner plugin in which i have solved the above issue. (add in pubspec.yaml)

card_scanner: git: url: https://github.com/ervinod/card-scanner-flutter.git

ZoraizEjaz commented 3 years ago

I am also getting the same issue. Update the package didn't solve the issue as well. => card_scanner: ^1.0.0-prerelease => ext.kotlin_version = '1.4.21' => classpath 'com.android.tools.build:gradle:4.1.3'

pub-cache/hosted/pub.dartlang.org/card_scanner-1.0.1-prerelease/android/src/main/java/com/nateshmbhat/card_scanner/CardScannerCameraActivity.kt: (50, 26): Type mismatch: inferred type is CardScannerOptions? but CardScannerOptions was expected e: /Users/revglue/Library/flutter/.pub-cache/hosted/pub.dartlang.org/card_scanner-1.0.1-prerelease/android/src/main/java/com/nateshmbhat/card_scanner/CardScannerCameraActivity.kt: (50, 33): Type mismatch: inferred type is CardScannerOptions? but CardScannerOptions was expected e: /Users/revglue/Library/flutter/.pub-cache/hosted/pub.dartlang.org/card_scanner-1.0.1-prerelease/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardScannerOptions.kt: (27, 44): Type mismatch: inferred type is ArrayList<String!>? but List was expected e: /Users/revglue/Library/flutter/.pub-cache/hosted/pub.dartlang.org/card_scanner-1.0.1-prerelease/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardScannerOptions.kt: (33, 45): Type mismatch: inferred type is ArrayList<String!>? but List was expected

FAILURE: Build failed with an exception.

ZoraizEjaz commented 3 years ago

getting above error while compiling card_scanner: ^1.0.1-prerelease

compileSdkVersion 30 classpath 'com.android.tools.build:gradle:4.1.3' ext.kotlin_version = '1.4.21'

Didn't work for me