1

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

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

it didn't work.
hey, @imonursahin I updated the answer with a URL that takes you to another answer which is similar to your error. Try it out. Hope its works for you.
it didn't happen again and strangely i started getting this error in all my projects

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.