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 :)

4

2 回答 2

7

尝试

dependencies {
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile 'com.android.support:support-v4:13.0.+'
}
于 2013-07-30T12:11:42.117 回答
0

在我使用与 ABS 和 gradle 示例中的文件相同的 gradle 文件之前,我遇到了同样的错误,这是一个工作示例项目:https ://github.com/JakeWharton/ActionBarSherlock-Gradle-Sample

于 2013-09-05T10:55:10.117 回答