Search code examples
javaandroiddebuggingprocessing

Execution failed for task app:transformClassesWithDexBuilderForDebug in Processing


I am using Processing to code and have been stuck on a problem for hours now, and after many hours of debugging I have given up because I 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

What I have 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 at https://discourse.processing.org/t/execution-failed-for-task-app/24563


Solution

  • I was facing the same problem quite a while ago. One of the reasons can be that the libraries that you may be importing in your processing sketch is not supported on android. Try removing the import statements to find out which may be causing the error.

    If all the libraries are supported by android, then try copying the main folder of the library in the data folder of your sketch. You can find the folder for the various libraries in the "libraries" folder which will be located inside the directory where all your sketches are stored.

    Also try updating your sdk by clicking Android >> SDK Updater in your processing IDE.

    One other solution could be updating using the sdk manager. If you are in windows, you can generally find the sdk manager in C:\users\username\appdata\local\android\sdk\tools\bin open this in cmd and then type sdkmanager --update to update.