我正在開發一個使用ActionBar Sherlock和Android Studio的演示應用程序。 的Android Studio版本是0.2.2,版本的Gradle是1.6和插件版本是0.5.1,我下面這些教程: -ActionBar Sherlock與Android Studio 0.2.2
www.grokkingandroid.com
showlabor.blogspot.ca
我收到以下錯誤: -
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文件是這樣的: -
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')
}
}
,我的項目生成的文件是這樣的: -
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
}
}
有這方面的線索高度讚賞
謝謝:)
您在IDE的項目中的哪個位置添加了ActionBarSherlock - 是否將它作爲庫項目導入,或者使用了jar嗎? –