【问题标题】:Gradle: Could not resolve all dependencies for configuration ':classpath'Gradle:无法解析配置“:classpath”的所有依赖项
【发布时间】:2016-10-09 13:41:41
【问题描述】:

我的 android studio 遇到了问题。每当我尝试运行一个应用程序,任何应用程序(甚至是空白的),都会发生错误。它总是这样的形式:

注意:Flip 是应用程序的名称...

Error: Gradle: A problem occurred configuring root project 'Flip'. 
     - Could not resolve all dependencies for configuration ':classpath'. 
     - Could not resolve com.android.tools.build:gradle:1.1.0.
        Required by:
                   :Flip:unspecified

我已经搜索了几天的解决方案,但无济于事,它使我的 android 工作室几乎毫无用处。

【问题讨论】:

    标签: java android android-studio gradle android-gradle-plugin


    【解决方案1】:

    将最新版本的android studio更新到2.1.2并进行更改

    classpath 'com.android.tools.build:gradle:2.1.2'
    

    【讨论】:

      【解决方案2】:

      转到您的 build.gradle(项目),将鼠标悬停在类路径上并将版本更新为建议的更新。

      如果上述建议不起作用,则表示存在同步问题。只需这样做:

      文件 > 使缓存无效并重新启动

      如果其他所有设置都正确,那么之后肯定可以正常工作。

      【讨论】:

        猜你喜欢
        • 2014-11-17
        • 2020-12-20
        • 2018-03-31
        • 2021-03-21
        • 2016-03-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多