0
  • Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151

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

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

/// give the solution of this type of error.

I tried this steps:

  1. delete ./gradle folder in app directory.
  2. delete pubspec.lock file
  3. flutter clean
  4. flutter pub get
  5. run project but i receive same error
  • Some error or invalid character entered in your code files, check your changes of code file and identify structure/code error – niceumang Jun 07 '23 at 07:26

1 Answers1

0

This exit error could be caused by many different problems.

Follow these steps and please, update your question if these don't help you.

  1. flutter clean -> flutter pub get -> flutter pub upgrade
  2. If you are using Android Studio: Build -> Clean and rebuild project
  3. If you are using Android Studio: Invalidate Caches and Restart
  4. Launch flutter doctor to check if everything is right
  5. Check for file names, assets names and paths inside your project, some assets or paths could be wrong. If wrong, Flutter won't build.
  6. flutter pub upgrade --major-versions to make sure your pubs are correctly downloaded

If this won't help, please update your question providing everything you done before this error and after this error. Looking around in Stackoverflow this happened after a flutter upgrade (this question).

Let me know and happy coding!

ItzDavi
  • 443
  • 4
  • 13