Could not find method google() for arguments

重装系统时,重新安装AS和导入项目出现的问题。

Error:(19, 0) Gradle DSL method not found: 'google()'
Possible causes:

原报错的gradle内容;

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
//        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
    }
}
 
  

把两行google()注释掉后重新编译就没问题了

你可能感兴趣的:(Android学习之路)