在建立一个项目的时候,直接报出了以下错误: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