Error:Failed to resolve: com.android.support:multidex:1.0.2 --AndroidStudio 3.0

开发中突然碰到一个问题,使用AndroidStudio 3.0 版本时
Project下build.gradle

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-beta7'   //Gradle版本
//        classpath 'io.fabric.tools:gradle:1.21.7'
        classpath 'me.tatarka:gradle-retrolambda:3.2.5'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

报错Error:Failed to resolve: com.android.support:multidex:1.0.2

解决方案,在根目录的build.gradle中

allprojects {
    repositories {
        jcenter()
    }
}

加上maven,如下

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
    }
}

大功告成

你可能感兴趣的:(Error:Failed to resolve: com.android.support:multidex:1.0.2 --AndroidStudio 3.0)