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

来源:互联网 发布:淘宝店代运营可靠吗 编辑:程序博客网 时间:2024/06/05 12:39

       从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,点击下,然后更新完成就可以了。
其他的方法都是扯淡的,,,我试了,没用


2 0
原创粉丝点击