Reputation: 11
I'm getting this error and I have tried some solutions but unable to resolved.
FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\src\flutter\bin\flutter.bat'' 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 6m 35s Exception: Gradle task assembleDebug failed with exit code 1
Any suggestions are welcomed.
Upvotes: 0
Views: 1122
Reputation: 674
Solution 1
Maybe this outdated but should help someone.
Yesterday I Just restarted my pc and got this issue. I tried to search for the solution to this problem but nothing works in my case .
Solution Just delete your flutter folder (Flutter Source) and then reinstall it. Your problem will solve.
Solution 2 I was able to get around this by running with null safety turned off. See this article for details.
dart --no-sound-null-safety run
flutter run --no-sound-null-safety
Upvotes: 1