Flutter build not creating Dart snapshot generator failed with exit code -9

Viewed 225

All is working fine on debug etc but when I create build its showing

 Building with sound null safety 

Dart snapshot generator failed with exit code -9
Dart snapshot generator failed with exit code -9
Dart snapshot generator failed with exit code -9


FAILURE: Build failed with an exception.

* Where:
Script '/Users/umaiz/Documents/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1005

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/umaiz/Documents/flutter/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 32s
Running Gradle task 'assembleRelease'...                           33.6s
Gradle task assembleRelease failed with exit code 1

Here is flutter version

[✓] Flutter (Channel stable, 2.5.1, on macOS 11.3.1 20E241 darwin-arm, locale
    en-PK)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)

I have already done with flutter pub clean and get that thing not work for me Also I haven't see this type of error in GitHub or stack overflow is it maybe M1 error ?

0 Answers
Related