Q:

Firebase auth ui (com.firebaseui:firebase-ui-auth)

I am working on firebase for my android app and I trying to implement firebase ui auth. While it works for some reason trying to do anything else on firebase produces this weird error that I cannot get to understand. If I comment out the library the rest of the code works great.
Here is the error I get:
 E/AndroidRuntime: FATAL EXCEPTION: main
                                                                     Process: my process, PID: 21371
                                                                   java.lang.NoSuchMethodError: No virtual method zzEq()Z in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp' appears in /data/app/ke.co.ziqi.testlesdge-1/split_lib_dependencies_apk.apk)
                                                                       at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
                                                                       at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
                                                                       at ke.co.ziqi.testlesdge.Groups.Channels.onCreate(Channels.java:80)
                                                                       at android.app.Activity.performCreate(Activity.java:6439)
                                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
                                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2498)
                                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2605)
                                                                       at android.app.ActivityThread.access$1100(ActivityThread.java:165)
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                       at android.os.Looper.loop(Looper.java:179)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:5730)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:681)

Here is the line where the error is occuring as I am trying to read through the realtime database. When I remove the library it works okay.
    users = FirebaseDatabase.getInstance().getReference().child("users").child(username).child("groups");
 gradle (app)
 compile 'com.android.support:appcompat-v7:26.+'
 compile 'com.android.support.constraint:constraint-layout:1.0.2'
 compile 'com.android.support:design:26.+'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-config:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:3.1.2'
compile 'com.google.firebase:firebase-invites:11.0.4'
compile 'com.flipboard:bottomsheet-core:1.5.3'
compile 'com.flipboard:bottomsheet-commons:1.5.3'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'org.jsoup:jsoup:1.10.3'
testCompile 'junit:junit:4.12'
gradle(project)
 dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.1.0'
    classpath "io.realm:realm-gradle-plugin:3.7.2"

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

A:

In order to solve this, please change this line of code:
compile 'com.firebaseui:firebase-ui-auth:3.1.2'

with
compile 'com.firebaseui:firebase-ui-auth:2.3.0'

Firebase/Play Services Version version 11.0.4 is compatible with FirebaseUI version 2.3.0.

