gradle build errors out with exception com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/auth/api/signin/internal/zzf;
compile rootProject.ext.libraries.firebaseCore
compile rootProject.ext.libraries.firebaseCrash
compile rootProject.ext.libraries.firebaseInvites
compile rootProject.ext.libraries.firebaseMessaging
compile rootProject.ext.libraries.firebaseAuthUI
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/auth/api/signin/internal/zzf;
I suspect that this is due to having firebase version mismatch between my project and firebaseui. (9.8 vs 10.0). Does it mean I'm not able to use firebase 10.0 until firebase-ui is updated to firebase 10.0?
Yes you are correct, however, there is an easy way to get around this by overriding the gradle dependencies. I highly recommend going through all the dependencies of your libraries (the deps of your deps) and overriding them to ensure you always have the latest version whether the library updates them or not. Here is a snippet of my gradle file that compiles and runs with play services v10:
// Firebase UI
// Auth
compile 'com.firebaseui:firebase-ui-auth:1.0.0'
compile "com.google.firebase:firebase-auth:$playServicesVersion"
compile "com.google.android.gms:play-services-auth:$playServicesVersion"
compile("com.twitter.sdk.android:twitter:2.1.1@aar") { transitive = true }
compile 'com.facebook.android:facebook-android-sdk:4.17.0'
compile "com.android.support:cardview-v7:$supportLibVersion"
// Database
compile 'com.firebaseui:firebase-ui-database:1.0.0'
compile "com.google.firebase:firebase-database:$playServicesVersion"
You have to add firebase storage if you are using the full firebase-ui lib.
@GaborPeto just to clarify a little, we are always "chasing" the latest version of the Firebase libraries. Because we want to develop FirebaseUI completely in the open (with the help of contributors like @SUPERCILEX) that means we generally lag by a few days. My goal is to get out a version of FirebaseUI that depends on Firebase/Play Services 10.0.0 ASAP.
@samtstern awesome!
Version 1.0.1 released which depends on Firebase 10.0.0, so this should be fixed.
Most helpful comment
Yes you are correct, however, there is an easy way to get around this by overriding the gradle dependencies. I highly recommend going through all the dependencies of your libraries (the deps of your deps) and overriding them to ensure you always have the latest version whether the library updates them or not. Here is a snippet of my gradle file that compiles and runs with play services v10:
You have to add firebase storage if you are using the full firebase-ui lib.