Reputation: 17
Why am I getting the following error? All of a sudden it started giving this error.
FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070
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
BU�LD FAILED in 1m 6s Exception: Gradle task assembleDebug failed with exit code 1
Upvotes: 1
Views: 2243
Reputation: 2584
Did you try deleting pubspec.lock
file? If not, try it. Or try these steps
Go to pubspec.yaml file in android studio.
try doing “packages get”
and then build the project again.
or follow this answer https://stackoverflow.com/a/66406390/16094734
Upvotes: 1