I would like to ask for some help for a trouble I can’t solve. I want to use Firebase Realtime Database in a Spring Boot controller but when I try to import the dependency, the gradle shows me the following error: Type Unresolved dependency: com.google.firebase:firebase-database:20.2.2. I’ve spend a few days reading websites, watching videos in YouTube and speaking with ChatGPT and Bard, but I didn’t succeed. As far as I know, I’ve just need to implement the following code in the gradle:
// Import for the Firebase platform
implementation 'com.google.firebase:firebase-admin:9.2.0'
implementation 'com.google.firebase:firebase-database:21.0.0
What I’m doing bad? Thanks everybody!
I’ve tried to add the dependencies on built.gradle using different versions of them.
2
Answers
Looking at the mvnrepository.com it seems indeed like
com.google.firebase:firebase-database:21.0.0
is not yet available.Most recent version is
20.2.2
For your information the latest version of
com.google.firebase:firebase-database
according to documentation is20.2.2
but you are trying to import21.0.0
To fix it just replace:
TO
I just tried and all work great.