简体   繁体   中英

Flutter debug error, FAILURE: Build failed with an exception

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

Did you tried 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.

Hope this resolves!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM