Search code examples
javaandroidfresco

Error in build after adding Fresco


I've added Fresco to my build.gradle:

compile 'com.facebook.fresco:fresco:0.9.0+'

Whenever I try to build the project, I'm getting the following error:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class

If I remove the dependency, then the error goes away. I couldn't find anything similar in search.


Solution

  • In gradle file add following code

    compile ('com.facebook.fresco:fresco:0.9.0+'){
    exclude group: 'com.parse.bolts', module: 'bolts-applinks';
    exclude module: 'bolts-android';
    exclude group: 'com.parse.bolts', module: 'bolts-tasks';
    }