无法在Android Studio上使用RoboGuice Sherlock

时间:2013-07-14 20:14:15

标签: maven gradle android-studio

我是Gradle和Maven的新手,所以如果我犯了一个noob错误,请耐心等待。

这是我的build.gradle文件(Project,not global)

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.actionbarsherlock:actionbarsherlock:4.3.+'
    compile 'com.github.rtyley:roboguice-sherlock:1.5'
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 17
    }
}

尽管我添加了ABS和RoboABS gradle下载了各自的jar,但AndroidStudio和Gradle都无法找到ABS类和主题。除了将maven工件添加到构建配置之外,我还需要做其他什么吗?

这正是我在尝试编译新项目模板时得到的错误,只是替换了类声明来扩展RoboSherlockActivity

Gradle: error: cannot access SherlockActivity
Gradle: error: cannot access SherlockActivity
class file for com.actionbarsherlock.app.SherlockActivity not found
Gradle: error: cannot find symbol variable super
Gradle: error: cannot find symbol variable activity_main
Gradle: error: method does not override or implement a method from a supertype
Gradle: error: cannot find symbol variable main
Gradle: error: cannot find symbol method getMenuInflater()
Gradle: error: method does not override or implement a method from a supertype

0 个答案:

没有答案