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

若如初见. 提交于 2019-12-11 16:47:56

问题


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


来源:https://stackoverflow.com/questions/48474920/gradle-sync-failed-could-not-find-method-dependencies-for-arguments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!