【问题标题】:Plugin is too old, please update to a more recent version,Fix plugin version and sync project插件太旧,请更新到最新版本,修复插件版本并同步项目
【发布时间】:2016-09-30 16:17:13
【问题描述】:

我已经设置了 android studio 2.2,我的 sdk 包含 api 23 和 api 24。 我的 build.gradle 文件如下:

apply plugin: 'com.android.application'
android {

compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
    applicationId "com.example.sanjay.myapplication"
    minSdkVersion 15
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
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:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:24.2.1'
}

我遇到以下错误:

Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "9d813ee66dd60f65615706c5deaa14afed669ca5"

Fix plugin version and sync project</a><br><a href="openFile:E:\MyApplication2\app\build.gradle">Open File</a>

请告诉我,这里出了什么问题,谢谢。

【问题讨论】:

  • 你更新你的gradle版本了吗?

标签: android android-studio gradle plugins


【解决方案1】:

当出现此类错误时(插件太旧,请更新到最新版本,修复插件版本,同步项目),点击修复插件版本并同步项目 出现在日志猫中。 Gradle 将同步,您可以开始了。

【讨论】:

    【解决方案2】:

    将您的项目级别 Build.gradle 更新为

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
    }
    

    【讨论】:

      【解决方案3】:

      https://gradle.org/gradle-download/ 下载最新的 gradle 和 转到:构建、执行、部署 ->> 构建工具 ->> Gradle(或者只需在搜索栏中输入 Gradle) 选择: (X) 使用本地 gradle 分发并将 Gradle home 设置为您提取的 Gradle 目录。点击申请。

      将您的项目 Build.gradle 更新为

      dependencies 
      {
          classpath 'com.android.tools.build:gradle: "latest version here"  '
      }
      

      Grade Version Compatibility for Android Studio

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-03-21
        • 1970-01-01
        • 2016-06-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多