Firebaseui-android: Failed to resolve firebase-ui-database and firebase-ui-auth

Created on 20 May 2016  Â·  33Comments  Â·  Source: firebase/FirebaseUI-Android

I've tried to update my firebase-ui dependency from 0.3.1 to 0.4.0 but Gradle Sync fails to resolve dependencies.

Error:Failed to resolve: com.firebaseui:database:0.4.0
Error:Failed to resolve: com.firebaseui:auth:0.4.0

Thanks in advance.

bug

Most helpful comment

Instead of adding compile 'com.firebaseui:firebase-ui:0.4.0'
add
compile 'com.firebaseui:firebase-ui-database:0.4.0'
or
compile 'com.firebaseui:firebase-ui-auth:0.4.0'
or add both

All 33 comments

@MrBrightside29 do you have 'jcenter()' in your repositories in your build.gradle file?

@samtstern Yes, just below mavenCentral. With 0.3.1 works just fine. Maybe, it could be due to 0.4.0 is not available in mavenCentral?

Some problem:

I copy pasted
`

// Single target that includes all FirebaseUI libraries
compile 'com.firebaseui:firebase-ui:0.4.0'

// FirebaseUI Database only
compile 'com.firebaseui:firebase-ui-database:0.4.0'

// FirebaseUI Auth only
compile 'com.firebaseui:firebase-ui-auth:0.4.0'`

(BTW you are using # instead of // in the documentation here: https://github.com/firebase/FirebaseUI-Android

Then after gradle sync i get:

Error:Could not find com.firebaseui:database:0.4.0.
Required by:
tiqetsapp-android:app:unspecified
tiqetsapp-android:app:unspecified > com.firebaseui:firebase-ui:0.4.0
Search in build.gradle files

I do have jcenter() as a repo.

Even adding the dependency

compile 'com.firebaseui:database:0.4.0'

Doesnt help

I looked into the sample app, this should be the imports:

// For firebase sign in
compile "com.google.firebase:firebase-database:9.0.0"
compile "com.google.firebase:firebase-auth:9.0.0"

@samtstern I've added the dependencies of ui-database and ui-auth separated instead of single dependency and it works fine.
I've also noticed that using the single dependency, gradle maybe fails to resolve because is looking for 'com.firebaseui:database:0.4.0' instead of 'com.firebaseui:firebase-ui-database:0.4.0'. Same for auth.

@tjerkw I think you are a little bit confused about the dependecies. Is not the same

"com.google.firebase:firebase-database:9.0.0"
"com.google.firebase:firebase-auth:9.0.0"

and

"com.firebaseui:firebase-ui-database:0.4.0"
"com.firebaseui:firebase-ui-auth:0.4.0"

Actually, firebaseUI depends on the first ones to work.

Instead of adding compile 'com.firebaseui:firebase-ui:0.4.0'
add
compile 'com.firebaseui:firebase-ui-database:0.4.0'
or
compile 'com.firebaseui:firebase-ui-auth:0.4.0'
or add both

@sdeff that's working as intended, FirebaseUI 0.3.x was published to MavenCentral but we moved to jcenter now since that's the default repository for all Android libraries.

@MrBrightside29 are you still have this issue? Do you only see it with 'com.firebaseui:firebase-ui:0.4.0' or are you also unable to resolve 'com.firebaseui:firebase-ui-database:0.4.0'.

@samtstern I'm able to resolve it using separated dependencies

compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebaseui:firebase-ui-auth:0.4.0'

Thanks

Ok I'm glad that solved your problem. For what it's worth, com.firebaseui:firebase-ui:0.4.0 is just an empty library that declares dependencies on those libraries for convenience.

I will leave this issue open until I can figure out what's going on with my jCenter configuration, thanks for the report!

Should be fixed now, closing. Re-open if you do a clean build and still see issues.

This is still happening for me, same error when just using firebase-ui:0.4.0 -
Error:Failed to resolve: com.firebaseui:database:0.4.0
Error:Failed to resolve: com.firebaseui:auth:0.4.0

Switching to the two components works fine:
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebaseui:firebase-ui-auth:0.4.0'

Is firebase-ui referencing the wrong libs? (com.firebaseui:database instead of com.firebaseui:firebase-ui-database)

@adamkoch your comment is the first one where I think I actually understand the issue here.

Yes it's very likely I botched the POM generation for firebaseui (the monolith). Re-opening to investigate.

Confirmed this is an issue (and my fault). Please use the individual dependencies for now.

Ok I just pushed a fix for this. There will be some propagation delay. @adamkoch if you can try it in >= 1hr and let me know if it works that would be great. Just build your project with the gradle flag --refresh-dependencies to make sure it re-downloads deps and does not use the cached copy.

Just checked and it has already propagated and is working fine now. Thanks! :)

Great work, been waiting for this fix

I'm still facing the same issue.

compile 'com.firebaseui:firebase-ui:0.4.0' gives me

Error:Failed to resolve: com.firebaseui:database:0.4.0
Error:Failed to resolve: com.firebaseui:auth:0.4.0

Why has the fix not influenced my Android Studio?

Did you try building with the refresh dependencies argument

On Sat, 4 Jun 2016, 5:41 pm Abhilash K, [email protected] wrote:

I'm still facing the same issue.

compile 'com.firebaseui:firebase-ui:0.4.0' gives me

Error:Failed to resolve: com.firebaseui:database:0.4.0
Error:Failed to resolve: com.firebaseui:auth:0.4.0

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/firebase/FirebaseUI-Android/issues/125#issuecomment-223765421,
or mute the thread
https://github.com/notifications/unsubscribe/AB1nOLwXo2c6vHJ895epznwW078lRP7eks5qIarGgaJpZM4IiuRJ
.

I added the dependency only today, so it should fetch the latest one I guess? I'd used it once before in another project though. Will android studio try to re-use that? If so, that would just repeat this problem. How do I refresh dependencies?

./gradlew build --refresh-dependencies, I'm not sure why it didn't fetch it after you added it today.

I also found downloading the source and running the maven publish local task to work for now

@abhilash1in also make sure that your project has jcenter() in the repositories block.

I am facing the same issue. Can someone help me out in this situation

Closing this issue, it's very old and FirebaseUI has been available on jcenter for a while now.

Oooh gosh me too am facing the same problem

Hello,
I have the same problem, I have not been able to resolve, with:

Error:(35, 13) Failed to resolve: compile 'com.firebaseui:firebase-ui-database:0.4.0'. please help me.

Please use the latest version of the library: 1.0.0.

Thank you @SUPERCILEX .

You're welcome!

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' compile 'com.google.firebase:firebase-core:11.8.0' compile 'com.google.firebase:firebase-database:11.8.0' compile 'com.firebaseui:firebase-ui:0.4.0' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' } apply plugin: 'com.google.gms.google-services'

Some error with appcompat and firebase-core

Change the build.gradle(project) file as follows:

allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}

Hope you will find a solution.

Was this page helpful?
0 / 5 - 0 ratings