-->

Gradle sync failed: Could not find method Dependen

2019-08-20 04:37发布

问题:

Full error:

Gradle sync failed: Could not find method Dependencies() for arguments [build_aewao5k4tyewg69imdynjiuxi$_run_closure1$_closure3@7c332105] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler.

Top level build.gradle:

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

buildscript {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }

   Dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

回答1:

Use dependencies (with small d) instead of Dependencies



回答2:

change Dependencies to dependencies

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
}