插件是太旧,请升级到最新版本,或者设置ANDROID_DAILY_OVERRIDE环境变量 [英] Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to
问题描述
今天我刚刚导入从Android SDK中一个示例应用程序作为一个模块在我的项目(分析),突然我,当我尝试同步它得到这个摇篮错误:插件是太旧,请升级到一个最新版本,或者设置ANDROID_DAILY_OVERRIDE envrinment变量...
这是我的应用程序摇篮
文件:
应用插件:com.android.application
安卓{
compileSdkVersion 22
buildToolsVersion22.0.0
defaultConfig {
的applicationIDxxx.xxxxxx.xxxxx
版本code 1
VERSIONNAME'1'
的minSdkVersion 9
targetSdkVersion 22
版本code 1
VERSIONNAME'1'
}
buildTypes {
推出 {
minifyEnabled假
proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
}
}
依赖{
编译文件树(导演:库,包括:['的* .jar'])
编译com.android.support:appcompat-v7:22.0.0
编译com.google.android.gms:播放服务:87年6月5日
编译com.android.support:recyclerview-v7:21.0.0
编译com.android.support:cardview-v7:21.0.0
编译com.facebook.android:facebook-android-sdk:3.21.1
testCompile'的JUnit:JUnit的:4.12
编制项目(:排)
}
你有什么想法这可能是原因(我使用的插件版本1.1.0-RC1和摇篮
2.2版本和 Android的工作室
1.1.0版本)?
编辑:
这是我的首要 build.gradle
:
buildscript {
库{
jcenter()
}
依赖{
类路径com.android.tools.build:gradle:1.1.0-rc1
//注意:不要在这里放置应用程序依赖;他们属于
//在单个模块build.gradle文件
}
}
allprojects {
库{
jcenter()
}
}
就像CommonsWare建议,请确保您有摇篮2.2.1+(最新的是2.3)。
请确保你升级你的Android Studio,但这里的插件需要 更新:
热门 build.gradle
:
修改
类路径com.android.tools.build:gradle:1.1.0-rc1
要:
类路径com.android.tools.build:gradle:1.1.3'//最新1.2.3
应用 build.gradle
:
修改
编译com.android.support:recyclerview-v7:21.0.0
编译com.android.support:cardview-v7:21.0.0
要:
编译com.android.support:recyclerview-v7:22.0.0'//最新的22.2.1
编译com.android.support:cardview-v7:22.0.0'//最新的22.2.1
摇篮: https://gradle.org/downloads
请务必检查了Android SDK管理器的最新版本:
Android编译工具插件:<一href="http://tools.android.com/tech-docs/new-build-system">http://tools.android.com/tech-docs/new-build-system
Android的支持库:<一href="http://developer.android.com/tools/support-library/features.html">http://developer.android.com/tools/support-library/features.html
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...
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')
}
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)?
EDIT:
This is my top 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()
}
}
Just like CommonsWare suggested, make sure you have Gradle 2.2.1+ (the latest is 2.3).
Make sure you upgrade your Android Studio but here are the "plugins" that need to be updated:
Top build.gradle
:
Change:
classpath 'com.android.tools.build:gradle:1.1.0-rc1'
To:
classpath 'com.android.tools.build:gradle:1.1.3' // latest 1.2.3
App build.gradle
:
Change:
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'
To:
compile 'com.android.support:recyclerview-v7:22.0.0' // latest 22.2.1
compile 'com.android.support:cardview-v7:22.0.0' // latest 22.2.1
Gradle: https://gradle.org/downloads
Always check the Android SDK Manager for the latest revisions:
Android Build Tools Plugin: http://tools.android.com/tech-docs/new-build-system
Android Support Libraries: http://developer.android.com/tools/support-library/features.html
这篇关于插件是太旧,请升级到最新版本,或者设置ANDROID_DAILY_OVERRIDE环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!