[Solved] How to solve Execution failed for task ‘:app:compileFlutterBuildDebug’ in Flutter

Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in mine stack track. Execution failed for task ‘:app:compileFlutterBuildDebug’ in flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How Execution failed for task ‘:app:compileFlutterBuildDebug’ Error occurs ?

When I was trying to run my flutter app and suddenly I get the following error in mine stack track

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\IMBA\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\IMBA\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 16s
Exception: Gradle task assembleDebug failed with exit code 1

How to Solve Execution failed for task ‘:app:compileFlutterBuildDebug’ ?

  1. How to Solve Execution failed for task ':app:compileFlutterBuildDebug' ?

    To Solve Execution failed for task ':app:compileFlutterBuildDebug' Error Go to the root of your project directory. Just delete pubspec.lock file. Now run pub get in your projects terminal. And then build the project again. That's it. our Error must be solved or else used below solutions.

  2. Execution failed for task ':app:compileFlutterBuildDebug'

    To Solve Execution failed for task ':app:compileFlutterBuildDebug' Error Go to the root of your project directory. Just delete pubspec.lock file. Now run pub get in your projects terminal. And then build the project again. That's it. our Error must be solved or else used below solutions.

Solution 1

Solution That Worked For me is

  1. Go to the root of your project directory.
  2. Just delete pubspec.lock file.
  3. Now run pub get in your projects terminal.
  4. And then build the project again.
  5. That’s it. our Error must be solved or else used below solutions.

Solution 2

Try the following:

  1. Go to pubspec.yaml file in android studio.
  2. try doing “packages get”
  3. and then build the project again.
  4. Hope this resolves!

Solution 3

Removing .gradle folder helped

  1. Close android studio.
  2. Remove whole .gradle folder.
  3. Open Android studio and build.

Solution 4

Most of the time for me it’s like

  • Misspelled assets name
  • Non-Existing asset/directory name

Summery

So it’s all About All possible solutions. Hope this above all solution helped you a lot. Comment below Your thoughts and your queries. Comment Below on your suggestion.

Check Out Below Article

5 thoughts on “[Solved] How to solve Execution failed for task ‘:app:compileFlutterBuildDebug’ in Flutter”

  1. I am a developer and more importantly, I am a fresher and I find this blog too good and tutorials are excellent. What makes it more interesting is that it is combined with infographics too. It’s very important that developers in each and every Flutter app development company see this. Anyways, will share it with my peers. Thank you.

    Reply
  2. In case u clone a repo from git and u can run the project I recommend delet /build from androd/app and re-run It works for me

    Reply

Leave a Comment

  Canva Pro Crack Filmora Pro Crack Spotify Premium Free Download Tradingview Premium Free