Gradle issue I think

Within Processing for android, I recently use the sdk updater. Since that update, I have not had a successful build on a sketch that was working on both the emulator and a device. The only thing I had done was the sdk updater. The error stream high mentions Gradle and suggests checking the gradle.org website. I don’t understand Gradle enough. Can anyone help make it clearer for me?
Thanks all

@markcosmic ===
what have you updated???

In Android mode, under the Android menu heading is SDK updater. I’m not sure which SDK the updater updates. Every so often I check for updates. If they’re available I update. The recent update causes the build to fail. This is the beginning of the error stream:
FAILURE: Build failed with an exception.

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

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 58s
22 actionable tasks: 22 executed
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution ‘https://services.gradle.org/distributions/gradle-4.3-bin.zip’.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:77)
at processing.mode.android.AndroidBuild.gradleBuild(AndroidBuild.java:286)
at processing.mode.android.AndroidBuild.build(AndroidBuild.java:230)
at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:315)
at processing.mode.android.AndroidEditor$15.run(AndroidEditor.java:373)
Caused by: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.

Ok, I managed to fix this issue. I did a fresh Processing 3 install and uninstalled the libraries involved with the sketch and reinstalling them.

1 Like