0

I've been banging my head on this for quite sometime now,i have added Firebase Phone Auth to one of my Android Modules in a Project,and i have made sure that play services and firebase:auth is at 11.0.2 version,but for some reason,it still says that i'm at different versions at 11.0.2 and 10.2.1,any inputs would be helpful

My Error

Error:Execution failed for task ':sample-videochat-webrtc:transformClassesWithDexForDevDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/zzc;

This is my app level gradle which has 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"

And this is my project level gradle which has play services version described

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
}

I don't know what else to do in this,please any inputs would be really helpful in this

  • Please show the rest of your build.gradle that shows the actual compile dependencies. – Doug Stevenson Sep 05 '17 at 16:21
  • @Doug it's added already,I'm not sure what you are asking for?? –  Sep 05 '17 at 17:05
  • Sorry, my mistake. – Doug Stevenson Sep 05 '17 at 18:13
  • Could you be more specific about this: "it still says that i'm at different versions at 11.0.2 and 10.2.1" – Doug Stevenson Sep 05 '17 at 18:14
  • @DougStevenson,ok so i have one more module in this which uses location and push notifications,in that gradle,i've added google-play-services-maps and location,which has version as "$rootProject.playServicesVerision",which is 11.0.2,in that it says i'm at different versions,should i include that here as well? –  Sep 06 '17 at 03:47
  • All your play services and Firebase dependencies should be at the same version. It will give you that warning if they are not. – Doug Stevenson Sep 06 '17 at 03:48
  • i know and it is on the same version,$rootProject.playServicesVerision is 11.0.2,but it still says i'm on 10.2.1 somewhere,and i can't figure out where –  Sep 06 '17 at 03:56
  • What *exactly* does the error message say? It should tell you which library is off version. – Doug Stevenson Sep 06 '17 at 03:57
  • yea,it says detected two different versions ,one at 11.0.2 and the other at 10.2.1,if i rebuild the project or build the apk then it says this " Multiple dex files define Lcom/google/android/gms/iid/zzc" –  Sep 06 '17 at 04:11
  • Two different versions *of what*? – Doug Stevenson Sep 06 '17 at 04:17
  • Google play services –  Sep 06 '17 at 04:18
  • It should indicate a specific library. If you don't know it, you have no easy way to correct it. – Doug Stevenson Sep 06 '17 at 04:19
  • it says google play services-base,would that help ?? –  Sep 06 '17 at 04:21
  • Possible duplicate of [Android Multiple dex files define Lcom/google/android/gms/common/api/zza](https://stackoverflow.com/questions/40877434/android-multiple-dex-files-define-lcom-google-android-gms-common-api-zza) – Ludy Astra-Germany Nov 22 '17 at 14:49

0 Answers0