0

I'm trying to add a library as a dependency but it keeps giving me this error:

Class android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat.AccessibilityServiceInfoIcsImpl has already been added to output. Please remove duplicate copies.

Execution failed for task ':BrooklynTech:dexDebug'. Could not call IncrementalTask.taskAction() on task ':BrooklynTech:dexDebug'

Here is my build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'

    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}
android {
    compileSdkVersion 19
    buildToolsVersion '19.0.0'
    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 19
    }
}
    dependencies {
        compile files('libs/Simple-Rss2-Android.jar')
        compile 'org.jsoup:jsoup:1.7.3'
        compile 'uk.co.androidalliance:edgeeffectoverride:1.0.1'
        compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
        compile project(':libraries:calendar-card')
        compile 'com.twotoasters.jazzylistview:library:1.0.0' }

the dependency I added was for jazzylistview - https://github.com/twotoasters/JazzyListView

How can I fix the error?

2 Answers 2

1

More than one of your dependencies is including the classes from the v4 support library; you'll need to track it down. You ought to be able to open up the jar files from the project viewer and find the culprit.

Ideally none of your dependencies ought to be bundling the support library; it's the responsibility of your app's build to make sure that gets finally linked in.

Sign up to request clarification or add additional context in comments.

Comments

0

Not sure, but could you try the following snippet. Maybe the transitive libs are causing the trouble

dependencies{
    ...
    compile ('com.twotoasters.jazzylistview:library:1.0.0'){
        transitive = false   
    }
}

cheers, René

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.