您的位置:首页 > 移动开发 > Android开发

Android Studio :Error:(1, 0) Plugin is too old, please update to a more recent version, or set AND……

2016-03-03 11:37 656 查看
       从Eclipse切换Android Studio工程时,原来已有的项目直接导入即可运行,可自己想新建个demo跑着玩呢,结果报了个奇葩错误:
Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variab

以下方案试过解决不了:
到网上查找解决方案大多都是说插件太旧,到某某地方更新插件就好了,还有说什么把旧项目中的Project下的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:1.2.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}


新文件(不可以运行的:)

// 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-alpha1'
}
}

allprojects {
repositories {
jcenter()
}
}

可行方案:

       解决办法是:classpath 'com.android.tools.build:gradle:1.2.3',然后在右上角,有个Try Again,点击下,然后更新完成就可以了。
其他的方法都是扯淡的,,,我试了,没用
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: