Search code examples
androidactionbarsherlockgradleandroid-holo-everywhere

HoloEverywhere, ActionBarSherlock with Gradle gives 'Attribute xxx has already been defined'


I'm trying to migrate from Maven to Gradle with my project.

So far we used HoloEverywhere v1.6.1 and ABS v4.3.1 and with Maven everything worked fine. Now I'm upgrading to HoloEverywhere v2.0.0-SNAPSHOT (latest master @ https://github.com/Prototik/HoloEverywhere) and ABS v4.4.0

HoloEverywhere build.gradle is kept intact.

This is my project library build.gradle configuration:

apply plugin: 'android-library'

dependencies {
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'

    compile project(':contrib:holo-everywhere:library')
    compile project(':contrib:holo-everywhere:addons:slider')
    compile project(':contrib:holo-everywhere:addons:preferences')
}

android {
    compileSdkVersion 18
    buildToolsVersion "18.1"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 18
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }
}

What am I missing here? Should I remove ABS here altogether because of new support-v4:18.0.1 library?


Solution

  • Yeah. Don't use ABS + HoloEverywhere v2.0.0+ together.