0

我一直在关注教程,将 ActionBarSherlock 集成到 Android Studio IDE 中。

完成所有步骤后,我收到以下错误:

Gradle: A problem occurred evaluating project ':MyApp'.
> Could not find property ':actionbarsherlock' on DefaultProjectDependency{dependencyProject='project ':MyApp'', configuration='default'}.

错误的来源是我的 AndroidStudioProjects\MyApp\myapp\build.gradle 文件,内容如下:

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.+'
    compile 'com.google.code.gson:gson:2.2.+'
    compile project ':actionbarsherlock'
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}
4

1 回答 1

0

也许一个迟到的答案,但尝试这样:

compile project(':actionbarsherlock')
于 2014-03-14T09:58:13.520 回答