Gradle sync failed: Plugin is too old,

在建立一個項目的時候,直接報出了以下錯誤:java

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)文件:android

// 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-alpha1app

參考地址以下:gradle

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

相關文章
相關標籤/搜索