Skip to content

Issue ':pay_android:compileDebugKotlin' persists after attempt to fix warnings about bindings #104355

@kenaitian

Description

@kenaitian

Issue persists even after following instructions to fix warnings about bindings:

https://docs.flutter.dev/development/tools/sdk/release-notes/release-notes-3.0.0#if-you-see-warnings-about-bindings


Launching lib/main.dart on LM Q610 FGN in debug mode...
Running Gradle task 'assembleDebug'...
../../.pub-cache/hosted/pub.dartlang.org/card_swiper-2.0.3/lib/src/custom_layout.dart:36:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback(_getSize);
                   ^
../../.pub-cache/hosted/pub.dartlang.org/card_swiper-2.0.3/lib/src/transformer_page_view/transformer_page_view.dart:540:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance!.addPostFrameCallback(_onGetSize);
                     ^
../../.pub-cache/hosted/pub.dartlang.org/card_swiper-2.0.3/lib/src/transformer_page_view/transformer_page_view.dart:554:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../Development/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance!.addPostFrameCallback(_onGetSize);
                     ^
e: /Users/ken/.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/ken/.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/ken/.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/ken/.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'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > 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 1m 5s
Exception: Gradle task assembleDebug failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions