Execution failed for task app

Full error below as the title wouldn’t accept it

I have been stuck on a problem for hours now, and after many hours of debugging I have given up and need help. The error reads:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:transformClassesWithDexBuilderForDebug’.
    com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\(myUserName)\AppData\Local\Temp\android5429541723127013969sketch\app\build\intermediates\transforms\desugar\debug\1.jar

So after a whole night of debugging this is what I found and what I’ve tried:
What was recommended most was using

./gradelw clean

However this meant a whole bunch of new problems with the command still not working and getting stuck on

Failed to notify project evaluation listener error

Which I have not found a solution for.

Deleting the Android folder did not seem to resolve the issue, with it persisting and not making a new android folder

Reinstalling the Android Library which did also not resolve the problem

CrossPosted on https://stackoverflow.com/questions/64325425/execution-failed-for-task-apptransformclasseswithdexbuilderfordebug-in-processi