今天從Eclipse切換Android Studio工程時(shí),報(bào)了個(gè)奇葩錯(cuò)誤:
Error:(1,0) Plugin is too old, please updatetoamore recentversion,orsetANDROID_DAILY_OVERRIDE environment variab
1
找了半天也沒找到什么原因,把原來的好的工程拿出來看了看,替換了Project下的build.gradle文件,就好了,然后比較新舊兩個(gè)文件,原來是這里不一樣:
舊文件(可以運(yùn)行的)
// Top-level build file where you can add configuration options common to allsub-projects/modules.buildscript {repositories {? ? ? ? jcenter()? ? }? ? dependencies {? ? ? ? classpath'com.android.tools.build:gradle:1.2.3'// NOTE: Donotplace your application dependencies here; they belong? ? ? ? // in the individual module build.gradle files? ? }}allprojects {? ? repositories {? ? ? ? jcenter()? ? }}
新文件(不可以運(yùn)行的:)
// Top-level build file where you can add configuration options common to allsub-projects/modules.buildscript {repositories {? ? ? ? jcenter()? ? }? ? dependencies {? ? ? ? classpath'com.android.tools.build:gradle:2.0.0-alpha1'}}allprojects {? ? repositories {? ? ? ? jcenter()? ? }}
原來是classpath升級(jí)了,導(dǎo)致的問題!換回原來的就好了
http://blog.csdn.net/zouchengxufei/article/details/50441268