ActionBar Sherlock with Android Studio 0.2.2

匿名 (未验证) 提交于 2019-12-03 01:58:03

问题:

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

回答1:

try

dependencies {     compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'     compile 'com.android.support:support-v4:13.0.+' }


回答2:

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



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!