Hans Spigel
Hans Spigel

Reputation: 167

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.FirebaseApp$IdTokenListenersCountChangedListener"

I have updated today Firestore dependency to the latest 19.0.0 version and I get this error:

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.FirebaseApp$IdTokenListenersCountChangedListener" on path: DexPathList[[zip file "/data/app/com.example.firebase-luwVSIdRPV8je9Y9uLU7Vw==/base.apk".

When trying to use:

db.collectionGroup("landmarks").whereEqualTo("type", "museum").get()

How to solve this?

Upvotes: 2

Views: 3514

Answers (4)

Rishita Joshi
Rishita Joshi

Reputation: 1

If you are using firebase storage or firebase database, and you got this error- then you have to change your dependency.

Change dependency version above or equal to 17, like below-

implementation 'com.google.firebase:firebase-storage:17.0.0'
implementation 'com.google.firebase:firebase-auth:17.0.0'

Upvotes: 0

Abhishek Khanal
Abhishek Khanal

Reputation: 1

Update all the dependencies to the latest version. Sync the project.. delete all the firebase import in every java file and re import..Then rebuild the project

Upvotes: 0

Devansh Maurya
Devansh Maurya

Reputation: 1012

I got the same problem and I was using com.firebaseui:firebase-ui-auth:4.3.1. I added the dependency com.google.firebase:firebase-auth:18.0.0 and it fixed the problem. It seems like a firebase auth dependency with version equal to or above version 17.0.0 will fix the problem.

Upvotes: 0

hexadecimal
hexadecimal

Reputation: 146

I got the same problem as you. In the firebase release notes May 07, 2019 it says; "If you use Firebase Authentication, update to firebase-auth v17.0.0 or later to ensure functionality alignment with other updated Firebase libraries." So, I changed my firebase auth dependency to the latest version, which means;

com.google.firebase:firebase-auth:17.0.0

and it fixed up my problem. I hope it helps. Best of luck! :)

Also you can check the release notes from here

Upvotes: 13

Related Questions