【问题标题】:Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE envrinment variable to插件太旧,请更新到最新版本,或将 ANDROID_DAILY_OVERRIDE 环境变量设置为
【发布时间】:2017-03-21 17:49:34
【问题描述】:

应用插件:'com.android.application' 应用插件:'com.google.gms.google-services'

机器人{ compileSdkVersion 23 buildToolsVersion "23.0.0"

defaultConfig {
    applicationId "com.xxxxx.xx.xx.xx.xxxxx"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            multiDexEnabled true
        }

        dexOptions {
            javaMaxHeapSize "2g"
        }
    }
}

}

依赖{ 测试编译'junit:junit:4.12' testCompile 'org.robolectric:robolectric:3.0'

compile files('libs/DTBSCommon.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.squareup.dagger:dagger-compiler:1.2.1'
compile 'com.android.support:design:23.1.1'
compile 'org.java-websocket:Java-WebSocket:1.3.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.0.6'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.0.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.0.6'
compile 'com.android.support:support-v4:23.1.1'
compile 'de.hdodenhof:circleimageview:2.0.0'

}

【问题讨论】:

    标签: android build.gradle gradle-dependencies


    【解决方案1】:

    此错误是由于您的构建工具版本和 compileSDKVersion 造成的。

    这是一个解决方法。

    首先从 SDK 管理器下载并安装所有可用的更新。 然后创建一个新项目。当您在当前应用中使用 google play services 插件时,请将 google play services 插件应用于新创建的项目。

    现在比较两个应用程序的 build.gradle(Module App),并对旧项目 build.gradle(module app) 进行更改。还将各种依赖项更新到最新版本。进行更改后同步 gradle,它应该像魅力一样工作。

    【讨论】:

    • 一些最新版本供您参考:compileSdkVersion 25 buildToolsVersion "25.0.0"
    • 编译'com.android.support:appcompat-v7:25.0.0'
    • 编译 'com.android.support.constraint:constraint-layout:1.0.0-beta3' 编译 'com.android.support:design:25.0.0' 编译 'com.android.support: support-v4:25.0.0' 编译 'de.hdodenhof:circleimageview:2.1.0'
    猜你喜欢
    • 2016-04-06
    • 2016-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-06
    相关资源
    最近更新 更多