关于报错:Failed to resolve: 'de.greenrobot:eventbus:2.4.0' 'de.greenrobot:greendao:2.1.0'等问题的解决办法

de.greenrobot:***需要mavenCentral 的支持,我们需要将mavenCentral() 添加到 repositories 中。具体解决办法是在工程的gradle文件中添加红色部分:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }
}

你可能感兴趣的:(android,studio)