添加新依赖项后,与gradle冲突的依赖项

时间:2015-08-05 15:47:48

标签: android build.gradle

我想将Floating button library添加到我的Android应用程序的依赖项中。事实上,在使用它并添加到build.gradle之后,构建失败了。我想,起初,它是关于它的依赖关系,所以我查了一下它们并试图排除它们,但是没有用。

任务app:dexDebug上的构建失败,出现以下错误行

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 2

这是我的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.grebeteam.myuniversity"
        minSdkVersion 19
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
   }
    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.1.1' //make build fails on 22.2.1, not related
    compile 'com.google.android.gms:play-services:7.3.0' //make build fails on 7.5.0, not related
    compile 'com.google.apis:google-api-services-calendar:v3-rev121-1.20.0'
    compile 'com.google.api-client:google-api-client:1.20.0'
    compile 'com.google.api-client:google-api-client-android:1.20.0'
    compile 'com.google.api-client:google-api-client-gson:1.20.0'
    compile 'de.hdodenhof:circleimageview:1.2.1'
    compile 'com.android.support:recyclerview-v7:22.2.1'
    compile ('com.melnykov:floatingactionbutton:1.3.0'){

        exclude module:"library"
        exclude module:"support-annotations"
        exclude module:"recyclerview-v7"
        exclude module:"support-v4"
    }


}

allprojects {
    gradle.projectsEvaluated {
       tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:deprecation"
       }
    }
}

this is the Floating Button Library build.gradle

我错过了什么或者我做错了什么?非常感谢你的时间。

编辑:这是我的项目级build.gradle

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

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

allprojects {
    repositories {
        jcenter()
    }
}

0 个答案:

没有答案