I am trying to use several functionalities of Firebase at the same time, which requires several implementations. Namely, cloud storage, database, and authentication. However, when using the Firebase interface in android studio and clicking on "add *** to your app" to add the implementation I'm getting the conflict
"Please fix the version conflict either by updating the version of the google-services"
implementation 'com.github.bumptech.glide:glide:4.0.0'
implementation 'com.google.firebase:firebase-auth:11.6.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
Those are the ones im using ( there is a red line under the auth one and when I hover over it, it says all libraries must use the same Version ...
Any ideas how to solve this ?
change this:
implementation 'com.google.firebase:firebase-auth:11.6.0'
into this:
implementation 'com.google.firebase:firebase-auth:11.8.0'
Ok After some Trial and Errors, I found out that I have to use 11.6.0 on all of them since Auth 11.8.0 Does not exist yet.
Related
I'm using Firebase Crashlytics and Firebase BoM
implementation "com.google.firebase:firebase-bom:26.2.0"
implementation "com.google.firebase:firebase-crashlytics-ktx"
The default configuration works ok, but I need to get access to FirebaseCrashlytics.getInstance()
And here comes the problem. Without setting crashlytics-ktx version it doesn't work.
I have to use
implementation "com.google.firebase:firebase-crashlytics-ktx:17.3.0"
instead of
implementation "com.google.firebase:firebase-crashlytics-ktx"
Any ideas how to resolve this?
I use only Firebase Database and I've added only the next dependency:
implementation 'com.google.firebase:firebase-database:16.0.1'
it seems works ok
but during compilation I get next warning
Warning: The app gradle file must have a dependency on
com.google.firebase:firebase-core for Firebase services to work as
intended.
Should I still add Core? like:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
Yes, you have to explicitly list it now:
Update - June 12, 2018
Your app gradle file now has to explicitly list com.google.firebase:firebase-core as a dependency for Firebase services to work as expected.
more info here:
https://firebase.google.com/support/release-notes/android
I'm working on a project. I started with updating the libraries after not touching the project for around a year or so. Updated most of the libraries except implementation 'com.google.android.gms:play-services-maps:9.2.1' and implementation 'com.google.android.gms:play-services-gcm:9.2.1' because there is an older version of a library supplying push for me, which I can't update right now. Anyways, after a while I opened some classes and noticed that for example SupportMapFragment is red and says "Unresolved reference". This happens with every class that comes out of the two libraries. However, the project still runs and still works as expected.
Why is this happening? And how can I fix it?
I will list some other libraries which could have an influence below:
$support_library_version = '27.1.0'
implementation "com.android.support:appcompat-v7:$support_library_version"
implementation "com.android.support:recyclerview-v7:$support_library_version"
implementation "com.android.support:cardview-v7:$support_library_version"
implementation "com.android.support:design:$support_library_version"
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1#aar') {
transitive = true;
}
They got updated from these versions:
$support_library_version = '24.1.1'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
Crashlytics was not added in previous versions
I was experiencing a similar issue earlier today and used the instructions from this post to fix it:
File->Invalidate Caches/Restart
In addition, it appears that Gradle 3.1.0 doesn't work, but Gradle 2.3.0 does.
Apparently the version I had for GCM and maps was too low. I had to update to a higher version and the unresolved references disappeared. I'm using 11.8.0 right now.
This question already has an answer here:
How to add firebase-admin to my android project?
(1 answer)
Closed 5 years ago.
I'm developing an Android app using Firebase, and went to install the Admin SDK using this tutorial. In my build.gradle file in my app, I've had a couple of dependencies that have given me warnings since I added them earlier in the project, but I was still able to run the application. Once I added the dependency needed for Admin SDK, things got a little more serious...
These are the original dependencies and their warnings:
implementation 'com.google.firebase:firebase-core:11.8.0'
All gms/firebase libraries must be the exact same version specification. Found versions 9.6.0, 11.8.0
implementation 'com.android.support:appcompat-v7:26.1.0'
All com.android.support libraries must be the exact same version specification. Found versions 26.1.0, 23.4.0
I searched the whole project using the double-shift search function in Android Studio and couldn't find anything that used either of the conflicting versions mentioned (9.6.0 or 23.4.0).
Like I said, the app still ran so I carried on developing. While adding the Firebase Admin SDK, I added the following dependency to my build.gradle:
implementation 'com.google.firebase:firebase-admin:5.6.0'
When I hit 'sync' on my gradle, I got the following error:
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.8.0.
This has left me a bit confused as I believe the most recent version of com.google.firebase:firebase-admin to be 5.6.0, so I don't see how I can be getting a version conflict for using this.
My app won't run while this error exists, so any help getting past it would be very much appreciated. I'm new to Android development so it might well be something very obvious that I've missed.
Here is my full list of dependencies:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0' <-- warning
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.8.0' <-- warning
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.firebaseui:firebase-ui:0.6.0'
implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-admin:5.6.0' <-- introduced error
implementation 'com.google.firebase:firebase-messaging:11.8.0'
}
If I can include anything else that will help with diagnosing, please let me know!
Thanks in advance,
Mark
The Firebase admin SDK is meant for JVM servers and can't be used in tandem with client SDKs. See this great post for more details. I would recommend using Cloud Functions for admin stuff instead since they're something you control and can't be compromised on the client.
Today meet some problem where I need to know the detailed difference between
compile 'com.firebase:firebase-client-android:2.4.0'
and
compile 'com.google.firebase:firebase-core:9.6.1'
Don't make attention to versions
So please share your knowledge.
The difference is that the first one is deprecated, the first one it is know as firebase 2.X.X and the firebase 3.X.X update use this dependencie compile 'com.google.firebase:firebase-core:9.6.1'.
In this page you can check what you need to install last Firebase SDK and their libraries. Greetings!
com.firebase:firebase-client-android is legacy. THEY ARE DEPRECATED AS OF MAY 18, 2016.
com.google.firebase:firebase-core is current
You can check it here
Also if you want to know the differrent beetween theme you can check 2 docs
https://firebase.google.com/docs/android/setup
https://www.firebase.com/docs/android/
If you need Firebase Client:
Firebase.getDefaultConfig().setLogLevel(com.firebase.client.Logger.Level.DEBUG);
You need the firebase client library:
dependencies {
// Firebase
implementation 'com.firebase:firebase-client-android:2.5.2'