androidflutterfirebaseapkbuilding

Gradle task assembleRelease failed with exit code 1


I'm developping my first app with Flutter and Firebase. I built it one time, far before connecting it to Firebase. Now I have done it at 90% but I can't build the apk and not able to correct to error caused while building it. I need help.

This is the error :

  C:\Users\Asus\flutter\bin\flutter.bat --no-color build apk

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

Running Gradle task 'assembleRelease'...                        
../../flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:205:27: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../flutter/packages/flutter/lib/src/scheduler/binding.dart').
    if (!SchedulerBinding.instance!.hasScheduledFrame) {
                          ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:206:24: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../flutter/packages/flutter/lib/src/scheduler/binding.dart').
      SchedulerBinding.instance!.scheduleFrame();
                       ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:209:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../flutter/packages/flutter/lib/src/scheduler/binding.dart').
    SchedulerBinding.instance!.addPostFrameCallback(startAnimationController);
                     ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.12.0/lib/src/chart_container.dart:232:22: Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
 - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../flutter/packages/flutter/lib/src/scheduler/binding.dart').
    SchedulerBinding.instance!.addPostFrameCallback(doRebuild);
                 ^

Thank you


Solution

  • I saw the problem, the fact is the plugin charts_flutter is deprecated on the version of flutter that I have. So I drop it out and the type of error never print again. Even if my app isn't okay yet, because of other kind of error.