Java Gradle:无法解析配置的所有依赖项';:类路径';

Java Gradle:无法解析配置的所有依赖项';:类路径';,java,android,android-studio,gradle,android-gradle-plugin,Java,Android,Android Studio,Gradle,Android Gradle Plugin,我的android studio遇到了一个问题。每当我尝试运行一个应用程序时,任何应用程序(即使是空白应用程序)都会发生错误。它总是以这种形式出现: 注意:Flip是应用程序的名称 Error: Gradle: A problem occurred configuring root project 'Flip'. - Could not resolve all dependencies for configuration ':classpath'. - Could not

我的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 studio几乎毫无用处

将最新版本的android studio更新为2.1.2并更改

classpath 'com.android.tools.build:gradle:2.1.2'
转到build.gradle(项目),将鼠标悬停在类路径上,并将版本更新为建议的更新

如果上述建议无效,则表示存在同步问题。只需这样做:

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

如果其他一切都设置正确,它肯定会在之后工作