Gradle sync failed: Plugin is too old,

不羁的心 提交于 2021-02-17 04:24:15

在创建一个项目的时候,直接报出了如下错误:

Gradle sync failed: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "e877086ba74456e68d4c929dc482539df9ffac38"
         Consult IDE log for more details (Help | Show Log)

然后直接修改了 top build.gradle(非app/build.gradle)文件:

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

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
//        classpath 'com.android.tools.build:gradle:2.0.0-alpha9'
        classpath 'com.android.tools.build:gradle:2.1.0-alpha1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

就是将gradle的版本升级了。换成了最新的:2.1.0-alpha1

参考地址如下:

http://stackoverflow.com/questions/29063968/plugin-is-too-old-please-update-to-a-more-recent-version-or-set-android-daily


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