FAILURE: Build failed with an exception. Exception: Gradle task assembleDebug failed with exit code 1

Hey guys i have an error with my program and it shows to ask for help in here, here’s my error

FAILURE: Build failed with an exception.

  • Where:
    Script ‘D:\Software\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle’ line: 1159

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

Process ‘command ‘D:\Software\Flutter\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.

Running Gradle task ‘assembleDebug’… 55.9s
Exception: Gradle task assembleDebug failed with exit code 1

i tried pub clean, get and upgrade but still nothing

here’s my flutter doctor result

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.3, on Microsoft Windows [Version 10.0.19044.2251], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at Download Visual Studio Tools - Install Free for Windows, Mac, Linux.
Please install the “Desktop development with C++” workload, including all of its default components
[√] Android Studio (version 2021.3)
[√] Connected device (4 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

any help would mean so much to me.

This unfortunate hint to ask here is unfortunately shown on any failed Gradle build, even if it is not at all a Gradle problem. In your case what you showed says that the task :app:compileFlutterBuildDebug is failing, so you probably have some problem in some code you try to compile and not a Gradle problem. Just scroll up and you probably see the actual error.