'Execution failed for task ':app:compileFlutterBuildDebug'. Process 'command 'C:\Users\flutter\bin\flutter.bat'' finished with non-zero exit value 1

When I was doing my project I had an error when I tried to run my code on the emulator. I can't see any issues when it comes to the code, I think it is something connected with android studio and flutter. I have tried almost everything and I can't solve it. This is what I get when I try to run the code:

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

When i run flutter clean I get: Flutter failed to delete a directory at "build". The flutter tool cannot access the file or directory. Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.

I would very appreciate if anyone could help me with my problem, I cant do any move further and it makes me very sad and confused



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source