多个Dex文件定义Lcom / google / android / gms / iid / zzc;

时间:2017-09-05 10:16:44

标签: android firebase android-gradle google-play-services firebase-authentication

我一直在讨论这个问题已经有一段时间了,我已经将Firebase Phone Auth添加到项目中的一个Android模块中,我确保播放服务和firebase:auth是11.0.2版本,但由于某种原因,它仍然说我在11.0.2和10.2.1的不同版本,任何输入都会有帮助

我的错误

  

错误:任务执行失败':sample-videochat-webrtc:transformClassesWithDexForDevDebug'。   com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:com.android.dex.DexException:多个dex文件定义Lcom / google / android /克/ IID / ZZC;

这是我的应用级gradle,它有Firebase Auth

    buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.20.1'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'


repositories {
    maven { url 'https://maven.fabric.io/public' }

}

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion

    defaultConfig {
        applicationId "com.xxx.sample.groupchatwebrtc"
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.targetSdkVersion
        versionCode 3
        versionName "1.0.2-xxx-xxx"


    }



    productFlavors {
        speedDev {
            minSdkVersion 21
        }
        dev {
            minSdkVersion rootProject.minSdkVersion
        }
    }


    buildTypes {
        debug {
            resValue "string", "versionName", "xxx WebRTC\nBuild version " + defaultConfig.getVersionName()
            signingConfig signingConfigs.debug
        }

        release {
            resValue "string", "versionName", "xxx WebRTC\nBuild version " + defaultConfig.getVersionName()
            signingConfig signingConfigs.debug
        }
    }

    signingConfigs {
        debug {
            storeFile file("../cert/debug.keystore")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
    }

    lintOptions {
        abortOnError false
    }
    buildToolsVersion '26.0.1'
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile "com.quickblox:quickblox-android-sdk-videochat-webrtc:$rootProject.qbSdkVersion"

    compile(project(":sample-core"))

    compile "com.android.support:recyclerview-v7:${rootProject.recyclerviewV7Version}"
    compile "com.android.support:support-annotations:${rootProject.supportAnnotationsVersion}"
   // compile "com.google.firebase:firebase-auth:${rootProject.firebaseVersion}"
    compile "com.navercorp.pulltorefresh:library:${rootProject.pullToRefreshVersion}@aar"
    compile("com.crashlytics.sdk.android:crashlytics:${rootProject.crashlyticsVersion}@aar") {
        transitive = true;
    }
    compile "com.android.support:cardview-v7:${rootProject.cardView}"
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.firebase:firebase-auth:11.0.2'
}
apply plugin: 'com.google.gms.google-services'
apply from: "../artifacts.gradle"

这是我的项目级gradle,它具有描述的播放服务版本

  

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
        }
    }

}

ext {
    compileSdkVersion = 23
    buildToolsVersion = "23.1.1"

    minSdkVersion = 19
    targetSdkVersion = 26

    sourceCompatibility = JavaVersion.VERSION_1_7
    targetCompatibility = JavaVersion.VERSION_1_7

    lintAbortOnError = false

    // QuickBlox SDK version
    qbSdkVersion = '3.3.1'

    versionName = '3.3.0'

    testRunnerVersion = "0.4.1"


    // Dependency versions
    playServicesVersion = '11.0.2'
    supportV4Version = '23.1.1'
    cardView = '23.1.1'
    appcompatV7Version = '23.1.1'
    recyclerviewV7Version = '23.1.1'
    supportAnnotationsVersion = '23.1.1'
    designVersion = '23.1.1'

    uilVersion = '1.9.0'
    glideVersion = '3.6.1'
    pullToRefreshVersion = '3.2.3'
    stickyListHeaders = '2.7.0'
    robotoTextViewVersion = '2.4.3'
    stickersVersion = '0.7.3'
    crashlyticsVersion = '2.6.8'
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.10'
}

def makeJar(variant, project) {
    //empty
}

我不知道还有什么可做的,请在此

中提供任何输入

0 个答案:

没有答案