Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

FAILURE: Build failed with an exception. #22

Closed
SaloniSS opened this issue May 23, 2022 · 4 comments
Closed

FAILURE: Build failed with an exception. #22

SaloniSS opened this issue May 23, 2022 · 4 comments
Labels
type:bug This is a bug that needs to be fixed

Comments

@SaloniSS
Copy link

== Building for Android ==

flutter build appbundle --release --flavor prod --no-sound-null-safety --build-name=2.0.298 --build-number=418
Running "flutter pub get" in clone... 3.0s

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Running Gradle task 'bundleProdRelease'...
lib/entry.dart:50:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.

  • 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../programs/flutter_3_0_1/packages/flutter/lib/src/scheduler/binding.dart').
    SchedulerBinding.instance!.addPostFrameCallback((_) {
    ^
    ../programs/flutter_3_0_1/.pub-cache/hosted/pub.dartlang.org/stripe_sdk-5.0.0-nullsafety.1/lib/src/ui/widgets/payment_method_selector.dart:58:28: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../programs/flutter_3_0_1/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((_) {
    ^
    ../programs/flutter_3_0_1/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/cached_network_image_provider.dart:109:29: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.
  • 'PaintingBinding' is from 'package:flutter/src/painting/binding.dart' ('../programs/flutter_3_0_1/packages/flutter/lib/src/painting/binding.dart').
    () => PaintingBinding.instance?.imageCache?.evict(key),
    ^
    ../programs/flutter_3_0_1/.pub-cache/hosted/pub.dartlang.org/cached_network_image-3.2.0/lib/src/image_provider/multi_image_stream_completer.dart:152:22: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
  • 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../programs/flutter_3_0_1/packages/flutter/lib/src/scheduler/binding.dart').
    SchedulerBinding.instance?.scheduleFrameCallback(_handleAppFrame);
    ^
    ../programs/flutter_3_0_1/.pub-cache/hosted/pub.dartlang.org/reorderables-0.3.2/lib/src/widgets/reorderable_wrap.dart:986:9: Error: No named parameter with the name 'overflow'.
    overflow: Overflow.clip,
    ^^^^^^^^
    ../programs/flutter_3_0_1/packages/flutter/lib/src/widgets/basic.dart:3708:3: Context: Found this candidate, but the arguments don't match.
    Stack({
    ^^^^^
    ../programs/flutter_3_0_1/.pub-cache/hosted/pub.dartlang.org/google_maps_place_picker_mb-2.0.0-mb.18/lib/src/autocomplete_search.dart:76:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../programs/flutter_3_0_1/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance!.addPostFrameCallback((_) {
    ^

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/builder/programs/flutter_3_0_1/packages/flutter_tools/gradle/flutter.gradle' line: 1156

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildProdRelease'.

Process 'command '/Users/builder/programs/flutter_3_0_1/bin/flutter'' finished with non-zero exit value 1

  • 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 2m 21s
Running Gradle task 'bundleProdRelease'... 145.3s
Gradle task bundleProdRelease failed with exit code 1

Build failed :|
Failed to build for Android

@martin-braun martin-braun added the type:bug This is a bug that needs to be fixed label May 23, 2022
@martin-braun
Copy link
Member

martin-braun commented May 23, 2022

Related to fysoul17#173 and this is probably the fix: fysoul17@afeaadb

I will look into this within the next few days.

@martin-braun
Copy link
Member

Hey @SaloniSS, it should compile now.

@stuartmorgan
Copy link

  • ../programs/flutter_3_0_1/.pub-cache/hosted/pub.dartlang.org/reorderables-0.3.2/lib/src/widgets/reorderable_wrap.dart:986:9: Error: No named parameter with the name 'overflow'.
    overflow: Overflow.clip,
    ^^^^^^^^

Note that this is the only error in the build output here, and it comes from another package. Using ! on a non-nullable value is, as the output says, only a warning, and is unrelated to the build failure.

@martin-braun
Copy link
Member

@stuartmorgan Thank you, it seems I solved it by upgrading a dep then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:bug This is a bug that needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants