App Stops working while using Firebase

2019-06-06 23:57:25.808 2717-3321/? E/RunLoop: Uncaught exception in Firebase Database runloop (3.0.0). Please report to [email protected]
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/FirebaseApp$IdTokenListener;
at com.google.firebase.database.android.AndroidPlatform.newAuthTokenProvider(com.google.firebase:firebase-database@@16.0.4:112)
at com.google.firebase.database.core.Context.ensureAuthTokenProvider(com.google.firebase:firebase-database@@16.0.4:246)
at com.google.firebase.database.core.Context.initServices(com.google.firebase:firebase-database@@16.0.4:98)
at com.google.firebase.database.core.Context.freeze(com.google.firebase:firebase-database@@16.0.4:77)
at com.google.firebase.database.core.RepoManager.createLocalRepo(com.google.firebase:firebase-database@@16.0.4:92)
at com.google.firebase.database.core.RepoManager.createRepo(com.google.firebase:firebase-database@@16.0.4:42)
at com.google.firebase.database.FirebaseDatabase.ensureRepo(com.google.firebase:firebase-database@@16.0.4:357)
at com.google.firebase.database.FirebaseDatabase.getReference(com.google.firebase:firebase-database@@16.0.4:188)
at com.example.firebase.MainActivity.addListeners(MainActivity.java:111)
at com.example.firebase.MainActivity.onActivityResult(MainActivity.java:93)
at android.app.Activity.dispatchActivityResult(Activity.java:7556)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4487)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4534)
at android.app.ActivityThread.-wrap20(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.google.firebase.FirebaseApp$IdTokenListener” on path: DexPathList[[zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/base.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_dependencies_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_resources_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_0_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_1_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_2_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_3_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_4_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_5_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_6_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_7_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_8_apk.apk”, zip file “/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_slice_9_apk.apk”],nativeLibraryDirectories=[/data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.firebase.database.android.AndroidPlatform.newAuthTokenProvider(com.google.firebase:firebase-database@@16.0.4:112)
at com.google.firebase.database.core.Context.ensureAuthTokenProvider(com.google.firebase:firebase-database@@16.0.4:246)
at com.google.firebase.database.core.Context.initServices(com.google.firebase:firebase-database@@16.0.4:98)
at com.google.firebase.database.core.Context.freeze(com.google.firebase:firebase-database@@16.0.4:77)
at com.google.firebase.database.core.RepoManager.createLocalRepo(com.google.firebase:firebase-database@@16.0.4:92)
at com.google.firebase.database.core.RepoManager.createRepo(com.google.firebase:firebase-database@@16.0.4:42)
at com.google.firebase.database.FirebaseDatabase.ensureRepo(com.google.firebase:firebase-database@@16.0.4:357)
at com.google.firebase.database.FirebaseDatabase.getReference(com.google.firebase:firebase-database@@16.0.4:188)
at com.example.firebase.MainActivity.addListeners(MainActivity.java:111)
at com.example.firebase.MainActivity.onActivityResult(MainActivity.java:93)
at android.app.Activity.dispatchActivityResult(Activity.java:7556)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4487)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4534)
at android.app.ActivityThread.-wrap20(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/com.example.firebase-VpqltEfax7w0PQuBLIBcxw==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.(DexFile.java:100)
at dalvik.system.DexFile.(DexFile.java:74)
at

Above is the logcat error generated when i run my firebase app

You can try these 2 links to solve your error

This is for older versions of firebase and does not resolve the issue.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.