插件太旧,请更新到最新版本,或将 ANDROID_DAIL

Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to(插件太旧,请更新到最新版本,或将 ANDROID_DAILY_OVERRIDE 环境变量设置为)

本文介绍了插件太旧,请更新到最新版本,或将 ANDROID_DAILY_OVERRIDE 环境变量设置为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我刚刚从 Android SDK 导入了一个示例应用程序作为我的项目(分析)中的一个模块,当我尝试同步它时突然出现这个 gradle 错误:插件太旧,请更新到更新版本,或将 ANDROID_DAILY_OVERRIDE 环境变量设置为...

today I just imported a sample app from Android SDK as a module in my project (analytics) and suddenly I got this gradle error when I try to sync it: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE envrinment variable to...

这是我的应用 gradle 文件:

This is my app gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.0"
    defaultConfig {
        applicationId "xxx.xxxxxx.xxxxx"
        versionCode 1
        versionName '1'
        minSdkVersion 9
        targetSdkVersion 22
        versionCode 1
        versionName '1'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile 'com.android.support:recyclerview-v7:21.0.0'
    compile 'com.android.support:cardview-v7:21.0.0'
    compile 'com.facebook.android:facebook-android-sdk:3.21.1'
    testCompile 'junit:junit:4.12'
    compile project(':volley')
}

您是否知道可能是哪个原因(我正在使用插件版本 1.1.0-rc1 和 gradle 版本 2.2 和 Android Studio 版本1.1.0)?

Do you have any idea of which may be the cause (I'm using the plugin version 1.1.0-rc1 and the gradle version 2.2 and Android Studio version 1.1.0)?

这是我的顶级build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0-rc1'

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

allprojects {
    repositories {
        jcenter()
    }
}

推荐答案

就像 CommonsWare 建议的那样,确保你有 Gradle 2.2.1+(最新的是 2.3).

Just like CommonsWare suggested, make sure you have Gradle 2.2.1+ (the latest is 2.3).

确保您升级了您的 Android Studio,但这里是需要升级的插件"更新:

Make sure you upgrade your Android Studio but here are the "plugins" that need to be updated:

顶部 build.gradle:

变化:

classpath 'com.android.tools.build:gradle:1.1.0-rc1'

收件人:

classpath 'com.android.tools.build:gradle:1.1.3' // latest 1.5.0

应用build.gradle:

变化:

compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'

收件人:

compile 'com.android.support:recyclerview-v7:22.0.0' // latest 23.1.1
compile 'com.android.support:cardview-v7:22.0.0' // latest 23.1.1

Gradle:https://gradle.org/downloads

始终检查 Android SDK 管理器以获取最新版本:

Always check the Android SDK Manager for the latest revisions:

Android 构建工具插件:http://tools.android.com/tech-docs/new-构建系统

Android Build Tools Plugin: http://tools.android.com/tech-docs/new-build-system

Android 支持库:http://developer.android.com/tools/support-library/features.html

Android Support Libraries: http://developer.android.com/tools/support-library/features.html

要查看最新的插件版本,请直接查看 Bintray Jcenter 页面:https://bintray.com/android/android-tools/com.android.tools.build.gradle/view.

To view the latest plugin releases, view the Bintray Jcenter page directly: https://bintray.com/android/android-tools/com.android.tools.build.gradle/view.

这篇关于插件太旧,请更新到最新版本,或将 ANDROID_DAILY_OVERRIDE 环境变量设置为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:插件太旧,请更新到最新版本,或将 ANDROID_DAIL

基础教程推荐