Skip to content Skip to sidebar Skip to footer

Execution Failed For Task':app:dexdebug'

This is my build.gradle file. apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion '20.0.0' defaultConfig { applicationId 'com.squ

Solution 1:

It's not a clash between v4-support and v7-appcompat, though it's true that if you have the latter you don't need the former. The duplicate class it's complaining about doesn't come from there anyway. You should be able to find out if in Android Studio you go to Navigate > Class and type in Escaper, you should be able to see the multiple libraries that define it.

I made a sample project where I included just the includes from your project that referenced downloadable dependencies from jcenter, and I can see that this library pulls in a copy of it:

compile'oauth.signpost:signpost-commonshttp4:1.2.1.2'

though it's coming in via a signpost-core-1.2.1.2.jar file. If I look at the pom file for that library (http://search.maven.org/remotecontent?filepath=oauth/signpost/signpost-commonshttp4/1.2.1.2/signpost-commonshttp4-1.2.1.2.pom) I can see that it's already pulling in signpost-core as a transitive dependency:

<dependencies><dependency><groupId>oauth.signpost</groupId><artifactId>signpost-core</artifactId><version>${project.version}</version><scope>compile</scope></dependency>

Later on in your build file, you include this as an explicit jar file, which is where the redundancy is coming from. By including signpost-commonshttp, it should be unnecessary to include signpost-core.

signpost shouldn't be redistributing these files at all, by the way -- this looks like a packaging error in the library.

Note that the build system is often able to avoid problems with redundant files if everything uses downloadable libraries instead of explicit jar files. Had you included signpost-core via this:

compile'oauth.signpost:signpost-core:1.2.1.2'

instead of including its jar file directly, you wouldn't have seen this problem.

Once you clear up this problem you'll run into other issues. httpmime clashes with versions of those files provided by Android, and this library may be redundant, but you can cross that bridge next.

Post a Comment for "Execution Failed For Task':app:dexdebug'"