receive_sharing_intent icon indicating copy to clipboard operation
receive_sharing_intent copied to clipboard

.pub-cache/hosted/pub.dartlang.org/receive_sharing_intent-1.4.1/android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt: (139, 67): Type mismatch: inferred type is Uri? but Uri was expected

Open krsolutions opened this issue 5 years ago • 6 comments

Launching lib/main_dev.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... e: /Users/reddy/flutter/.pub-cache/hosted/pub.dartlang.org/receive_sharing_intent-1.4.1/android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt: (139, 67): Type mismatch: inferred type is Uri? but Uri was expected e: /Users/reddy/flutter/.pub-cache/hosted/pub.dartlang.org/receive_sharing_intent-1.4.1/android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt: (199, 95): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':receive_sharing_intent:compileDebugKotlin'.

Compilation error. See log for more details

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 19s Exception: Gradle task assembleDebug failed with exit code 1

krsolutions avatar Oct 31 '20 08:10 krsolutions

Here is a fix https://github.com/KasemJaffer/receive_sharing_intent/issues/104

momilc avatar Nov 18 '20 11:11 momilc

Here is a fix #104

@momilc Could your fork the project with your changes to see what else to change? Thanks

thegrxp avatar Nov 30 '20 15:11 thegrxp

Just got this too with Kotlin 1.4.20 and Gradle 4.1.0:

e: /xxx/.pub-cache/hosted/pub.dartlang.org/receive_sharing_intent-1.4.2/android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt: (146, 78): Type mismatch: inferred type is Uri? but Uri was expected
e: /xxx/.pub-cache/hosted/pub.dartlang.org/receive_sharing_intent-1.4.2/android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt: (207, 95): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
                                                                        
FAILURE: Build failed with an exception.  

ghenry avatar Dec 02 '20 20:12 ghenry

Hello. OK I will. Note : Nothing else to do it should work with my fix

momilc avatar Dec 05 '20 10:12 momilc

The error occurs with compileSdkVersion 30. If I put 29 again, in build.gradle, it works fine.

francigueco avatar Jan 23 '21 14:01 francigueco

Same here. It doesn't work with Target API == 30.

proninyaroslav avatar Mar 01 '21 14:03 proninyaroslav