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.
flutter clean, flutter pub get, flutter build appbundle --release --no-tree-shake-icons
Solution That Worked For me is
- 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.
Try the following:
- Go to pubspec.yaml file in android studio.
- try doing “packages get”
- and then build the project again.
- Hope this resolves!
Removing .gradle folder helped
- Close android studio.
- Remove whole .gradle folder.
- Open Android studio and build.
Most of the time for me it’s like
- Misspelled assets name
- Non-Existing asset/directory name