3

I am developing a demo app using ActionBar Sherlock and Android Studio. Android Studio Version is 0.2.2, gradle version is 1.6 and plugin version is 0.5.1 and i am following these tutorials :-

www.grokkingandroid.com
showlabor.blogspot.ca

i am getting following error :-

 Gradle: Execution failed for task ':libraries:ActionBarSherlock:actionbarsherlock:compileReleaseAidl'.tried to access class com.android.build.gradle.internal.tasks.DependencyBasedCompileTask$DepFileProcessor from class com.android.build.gradle.internal.tasks.DependencyBasedCompileTask

actionbarsherlock build.gradle file goes like this :-

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

apply plugin: 'android-library' 

dependencies {
  compile 'com.android.support:support-v4:18.0.+'
}

android {
  compileSdkVersion 17
  buildToolsVersion '17.0.0'

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }

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

        instrumentTest.setRoot('tests')
    }

 }

and my project build file goes like this :-

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

repositories {
    mavenCentral()
}
dependencies {
    compile 'com.android.support:support-v4:13.0.+'
}
dependencies {
    compile project(':libraries:ActionBarSherlock:actionbarsherlock')
}
android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

any leads on this is highly appreciated

Thanks :)

r4jiv007
  • 2,974
  • 3
  • 29
  • 36

2 Answers2

7

try

dependencies {
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile 'com.android.support:support-v4:13.0.+'
}
ligi
  • 39,001
  • 44
  • 144
  • 244
  • for which gradle file can u please be more specific !! – r4jiv007 Jul 30 '13 at 18:01
  • 1
    for your project - you do not need to touch ABS that way any more - all fetched from maven central - that is now possible as ABS is now available as AAR through maven central - no more workarounds needed – ligi Jul 30 '13 at 18:06
  • same as posted in question – r4jiv007 Jul 30 '13 at 18:09
  • you need to remove this line compile project(':libraries:ActionBarSherlock:actionbarsherlock') – ligi Jul 30 '13 at 18:10
  • Gradle: Execution failed for task ':SherlockTest:processDebugManifest'. Manifest merging failed. See console for more info. – r4jiv007 Jul 30 '13 at 18:31
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/34478/discussion-between-r4jiv007-and-ligi) – r4jiv007 Jul 30 '13 at 18:31
  • 1
    @ligi, found a solution for this error? I am still getting this same error. – Bharat Aug 11 '13 at 21:09
  • 1
    You will get errors if support-v7 is also in your dependencies; consider switching from ActionBarSherlock to ActionBarCompat from the support v7 library if you want to use it. – personne3000 Aug 24 '14 at 11:10
0

I had the same error until I used the same gradle file as the one from the sample for ABS and gradle here, that's a working sample project: https://github.com/JakeWharton/ActionBarSherlock-Gradle-Sample

  • That requires that you put a build folder and insert an exploded-bundles directory into it called: ComActionbarsherlockActionbarsherlock440.aar It's a very convoluted setup. – IgorGanapolsky Oct 07 '13 at 16:52