1

I'm trying to use Firebase UI in my Android project

When I add the necessary compile statement in the build.gradle file:

compile 'com.firebaseui:firebase-ui-database:2.3.0'

the project does not compile any more and I keep getting the following messages:

gradle build errors

My build.gradle dependencies section is:

compile 'com.firebaseui:firebase-ui-database:2.3.0'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.google.firebase:firebase-auth:9.8.0'
compile 'com.google.firebase:firebase-database:9.8.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:26.+'

This SO answer does not help me further.

Any suggestion?

Thank you very much for your time and assistance in this matter, regards

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
user1737538
  • 497
  • 2
  • 7
  • 16

3 Answers3

1

I would click on each link that says, "Install repository and sync project". You don't have a couple the required tools installed, primarily thecom.android.support:support-v4. This different than the app-compat verision you have in there.

BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
  • 1
    I clicked already: Android Studio lets me wait for a while and then does nothing, no matter which link I click on. – user1737538 Sep 20 '17 at 19:13
  • @user1737538 I would recommend checking your SDK manager to make sure that the appropriate frameworks are downloaded. it may also be downloading in the background – BlackHatSamurai Sep 20 '17 at 20:03
0

Upgrade your Firebase Auth And Database dependencies to this:

compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'

So as mentioned in the docs you need version 11.0.4 of Firebase Services for 2.3.0 FirebaseUI Version

Also check this table and upgrade or downgrade your dependencies depending on it.

Kartik Shandilya
  • 3,796
  • 5
  • 24
  • 42
0

Thanks to Novo Lukas' suggestion, now the project builds correctly. The problem was the maven entry in the build.gradle project file: I added the

maven { url  'https://maven.google.com' }

line only to the repositories branch, but not to the allprojects. Adding that line to the allprojects too did the magic.

Thanks to all, regards

user1737538
  • 497
  • 2
  • 7
  • 16