Getting error when build for android
fabcarvalhal opened this issue · 1 comments
fabcarvalhal commented
Hi, i',m getting these errors when trying to build for Android.
e: /Users/fabricio/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.0+3/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardDetails.kt: (15, 11): Type mismatch: inferred type is String? but String was expected
e: /Users/fabricio/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.0+3/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardDetails.kt: (16, 11): Type mismatch: inferred type is String? but String was expected
e: /Users/fabricio/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.0+3/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardDetails.kt: (17, 11): Type mismatch: inferred type is String? but String was expected
e: /Users/fabricio/.pub-cache/hosted/pub.dartlang.org/card_scanner-0.2.0+3/android/src/main/java/com/nateshmbhat/card_scanner/scanner_core/models/CardDetails.kt: (18, 11): Type mismatch: inferred type is String? but String was expected
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':card_scanner:compileDebugKotlin'.
> Compilation error. See log for more details
My android project requirements are:
compileSdkVersion 29
minSdkVersion 24
targetSdkVersion 29
I did investigate the code and, in CardDetails.kt, if I change the lines 15,16,17 and 18 to the above code the project compiles and runs:
this(
parcel.readString() ?? "",
parcel.readString() ?: "",
parcel.readString() ?: "",
parcel.readString() ?: ""
)
Steps to reproduce:
Install this lib in a project, using the pubspec, then run the project for android simulator or device
m7amdElberawy commented
Hello Guys,
Not work with me when run android app any solution ?
@nateshmbhat @fabcarvalhal