Gradle 同步失败:找不到参数的方法 Dependencies()

Gradle sync failed: Could not find method Dependencies() for arguments

完整错误:

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.

顶级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'
    }
}

使用dependencies(小d)代替Dependencies

将 Dependencies 更改为 dependencies

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