"错误:插件太旧了#34;这个gradle有什么问题?

时间:2016-08-23 06:57:30

标签: java android eclipse

它会引发以下错误。

  

错误:插件太旧,请更新到更新的版本,或   将ANDROID_DAILY_OVERRIDE环境变量设置为   " ccbf255801ffbc86319e3fd14bdc0682272bf5c9"

     

失败:构建因异常而失败。

     

其中:     构建文件' E:\ srk \ android \ app \ build.gradle' line:1

     

出了什么问题:       评估项目':app'时出现问题。无法应用插件[id' com.android.application']无法创建类型的插件   ' AppPlugin'

     

尝试:       使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 23
        buildToolsVersion "24.0.1"

        defaultConfig {
            applicationId "com.vineyard.crash"
            minSdkVersion 10
            targetSdkVersion 23

            ndk {
                moduleName "player_shared"
            }
        }

        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            }
        }
    }
    dependencies {
        compile 'com.google.android.gms:play-services:+'
        compile files('libs/dagger-1.2.2.jar')
        compile files('libs/javax.inject-1.jar')
        compile files('libs/nineoldandroids-2.4.0.jar')
        compile files('libs/PTAdVungle.jar')
        compile files('libs/support-v4-19.0.1.jar')
    }

3 个答案:

答案 0 :(得分:1)

在项目build.gradle和同步gradle中再次尝试此更改

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'

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

答案 1 :(得分:0)

我有同样的问题,通过在顶级gradle中添加以下行来解决我的问题

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'

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

答案 2 :(得分:0)

我有同样的问题,我解决了它只是改变我的build.gradle

由此:

classpath "com.android.tools.build:gradle:2.1.2"

对此:

classpath('com.android.tools.build:gradle:2.1.2') {
    force = true
}

我希望你的帮助