Reputation: 1141
in FLutter 3.0 facing error while implimeting gpay in flutter with pay package.
e: /Users/karmaln/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/pay_android-1.0.6/android/src/main/kotlin/io/flutter/plugins/pay_android/PayMethodCallHandler.kt: (50, 69): Type mismatch: inferred type is Activity? but Activity was expected
e: /Users/karmaln/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/pay_android-1.0.6/android/src/main/kotlin/io/flutter/plugins/pay_android/PayMethodCallHandler.kt: (69, 74): Type mismatch: inferred type is String? but String was expected
e: /Users/karmaln/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/pay_android-1.0.6/android/src/main/kotlin/io/flutter/plugins/pay_android/PayMethodCallHandler.kt: (73, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Map<String, Any>?
e: /Users/karmaln/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/pay_android-1.0.6/android/src/main/kotlin/io/flutter/plugins/pay_android/PayMethodCallHandler.kt: (74, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Map<String, Any>?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':pay_android: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 30s
Exception: Gradle task assembleDebug failed with exit code 1
I Want to implement googlepay and Apple using pay: ^1.0.8 package
kotlin version used in project : ext.kotlin_version = '1.6.10'
min SDK version : minSdkVersion 21
Upvotes: 0
Views: 130
Reputation: 540
Open project level build.gradle then replace your ext.kotlin_version = '1.4.32' with new version.
Upvotes: 0