truecaller / flutter-sdk

Flutter plugin that uses Truecaller's Android SDK to provide mobile number verification service to verify users.
https://pub.dev/packages/truecaller_sdk
MIT License
24 stars 38 forks source link

Type mismatch: inferred type is String? but String was expected | Build failed #39

Open divyamdhz opened 2 years ago

divyamdhz commented 2 years ago

Hello team,

I recently upgraded Flutter to v3.3.2 and as soon as I started building my project, This error popped up :

/Users/divyamdhadwal/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/truecaller_sdk-0.1.1/android/src/main/kotlin/com/truecallersdk/TruecallerSdkPlugin.kt: (146, 38): Type mismatch: inferred type is String? but String was expected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':truecaller_sdk:compileDebugKotlin'.
> Compilation error. See log for more details

Seems like an issue within the TruecallerSdkPlugin.kt file on line 146 (REQUEST_VERIFICATION block). Any idea how to resolve this ? Our app relies heavily on Truecaller for day to day auth needs.

I'm using Truecaller plugin's v0.1.1 (latest). Any help would be really appreciated.

singhalyogesh commented 1 year ago

Hi @divyamdhz
We acknowledge the issue reported above, and a fix is already in progress. This would be fixed in the next version of Truecaller SDK flutter plugin that we'll release soon post testing. We did some investigation at our end and were able to conclude that the SDK implementation caused the issue mentioned when the flutter stable channel was greater than 2.8.0. Therefore, as an interim solution you can also downgrade the flutter version to 2.8.0 or wait for the next release which ideally should be live by later half of the next week.

Please feel free to write to us on our support channel(https://developer.truecaller.com/contact) for faster and dedicated response.

AkaankshK commented 1 year ago

Facing the same issue. Please release a fix. Flutter 3 has a lot of improvements. Downgrading is not an option 😅