Android的冲突com.android.support:support-v4:23.1.1库(顶级异常)存在值0

时间:2016-04-14 15:08:41

标签: android android-gradle

在我的android项目中,我使用的是两个模块,但模块使用相同的lib.com.android.support:support-v4:23.1.1,所以我得到了     在android studio中运行时发生冲突。将错误记录为

  

错误:任务执行失败   ':应用程序:transformClassesWithDexForDebug&#39 ;.            com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:           org.gradle.process.internal.ExecException:进程'命令           ' /usr/local/java/jdk1.8.0_65/bin/java''完成非零退出           价值2

我的第一个学习模块

{


    dependencies  {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile 'com.android.support:support-v4:23.1.1'
        compile project(':ime') }

第二个gradle模块

    dependencies  {
        compile(group: 'com.layer.sdk', name: 'layer-sdk', version: "0.15.0")  {
            exclude group: "com.android.support"
        }
        compile 'com.squareup.picasso:picasso:2.5.2'
        compile 'org.slf4j:slf4j-nop:1.5.8'
        compile ('com.rockerhieu.emojicon:library:1.2')
                {
                    exclude group: "com.android.support"
                }
        compile 'com.makeramen:roundedimageview:2.2.0'
        compile 'com.android.support:support-v4:23.1.1' }

App gradle文件

    buildscript {
        repositories {
            jcenter()
            mavenCentral()
            maven { url 'https://maven.fabric.io/public' }
            maven { url 'https://raw.github.com/rockerhieu/mvn-repo/master/' }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.3.0'
            classpath 'io.fabric.tools:gradle:1.+'
        } } apply plugin: 'com.android.application' apply plugin: 'io.fabric'

    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://raw.github.com/rockerhieu/mvn-repo/master/' } }

    sourceSets {
        main {
            java.srcDirs = ['src/main/java', 'src/main/java-gen']
        } }

    android {
        compileSdkVersion 21
        buildToolsVersion "21.1.1"

        defaultConfig {
            applicationId "com.appscrip.sup"
            minSdkVersion 14
            targetSdkVersion 21
            versionCode 5
            versionName "1.4"
        }

        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
        buildTypes {
            release {
                minifyEnabled false
                multiDexEnabled true
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        } }

    dependencies  {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile 'com.google.android.gms:play-services-gcm:7.8.0'
        compile 'com.google.android.gms:play-services-maps:7.8.0'
        compile 'com.google.android.gms:play-services-nearby:7.8.0'
        compile 'com.layer.sdk:layer-sdk:0.15.0'
        compile 'org.slf4j:slf4j-api:1.7.7'
        compile project(':layer-atlas')
        compile project(':indic_key_pad')
        compile 'com.parse.bolts:bolts-android:1.+'
        compile 'com.github.nkzawa:socket.io-client:0.5.2'
        compile 'com.squareup.picasso:picasso:2.5.2'
        compile 'com.squareup.okhttp:okhttp:2.5.0'
        compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
            transitive = true;
        }

    }
}

0 个答案:

没有答案