0

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.

0

2 Answers 2

0

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

0

For your information the latest version of com.google.firebase:firebase-database according to documentation is 20.2.2 but you are trying to import 21.0.0

To fix it just replace:

implementation 'com.google.firebase:firebase-database:21.0.0'

TO

implementation 'com.google.firebase:firebase-database:20.2.2'

enter image description here

I just tried and all work great.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.