ThanmaDW
ThanmaDW

Reputation: 89

Execution failed for task ':app:mergeExtDexXXXDebug'

I am using

Android Studio 3.5, gradle-5.4.1-all.zip, com.android.tools.build:gradle:3.5.0, org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

I got error when i rebuild project:

What went wrong: Execution failed for task ':app:mergeExtDexProductionDebug'. Could not resolve all files for configuration ':app:productionDebugRuntimeClasspath'.

Failed to transform artifact 'protobuf-java.jar (com.google.protobuf:protobuf-java:3.10.0)' to match attributes {artifactType=android-dex, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.usage=java-runtime-jars}.

Execution failed for DexingWithClasspathTransform: C:\Users\xxx\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\3.10.0\410b61dd0088aab4caa05739558d43df248958c9\protobuf-java-3.10.0.jar.

Error while dexing.

I had google, but i can not get solution for this case

Can you help me resolve this problem?

Thanks in advance.

Upvotes: 2

Views: 3218

Answers (2)

Cœur
Cœur

Reputation: 38757

Solution by OP.

I solved my problem with code below:

configurations.all {
    resolutionStrategy {
        force("com.google.protobuf:protobuf-java:3.11.0-rc-1")
    }
}

Upvotes: 2

Ankita
Ankita

Reputation: 1159

In app build.gradle file add this-

android{

  .........

  aaptOptions {  
     cruncherEnabled = false  
  }
  ................  
}

Now, build, clean and rebuild project.

If still not got the solution try to downgrade your build version and again build the project.

Upvotes: 0

Related Questions