skip to Main Content

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


  1. 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

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search