skip to Main Content

I was trying to run my Flutter app and this shows up:

I do flutter clean, I delete pubspec.lock

FAILURE: Build failed with an exception.

  • Where:
    Script ‘/Users/mac/development/flutter/packages/flutter_tools/gradle/flutter.gradle’ line: 1005

  • What went wrong:
    Execution failed for task ‘:app:compileFlutterBuildDebug’.

Process ‘command ‘/Users/mac/development/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 21s
Exception: Gradle task assembleDebug failed with exit code 1

3

Answers


  1. It seems that you missed running pub get after running flutter clean. Build task issues similar to what you’ve encountered could be usually solved by running flutter clean to clear the project’s build cache and running flutter pub get to fetch the project’s dependencies configured in the project’s pubspec.yaml

    Login or Signup to reply.
  2. Delete android/app/build folder and run flutter clean

    worked for me.. 🙂

    Login or Signup to reply.
  3. Just delete the pubsec.lock file and run the project, it worked for me 😉

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search