Android studio not suggesting Firebase BOM new versions - android

I am using firebase in my android app, and I had included several firebase client libraries in my build.gradle, each by its own version.
When a new version of each library was available, Android Studio suggested me to upgrade the version to the newer version by highlighting the dependency in yellow.
I recently updated my build.gradle to use Firebase BOM, so that the BOM picks the compatible versions of the each firebase library, so I don't need to specify individual versions of each firebase library.
implementation platform('com.google.firebase:firebase-bom:26.1.0')
Now, Android Studio doesn't detect new versions of firebase-bom, like it did for individual firebase libraries earlier. For an example, I can see that 26.1.1 of firebase-bom is released, but Android Studio doesn't show me that.
Why is this? Is there any way to get Andriod Studio to detect new versions of firebase-bom?

Related

Firebase specific libraries for Kotlin Android Studio

I recently upgraded Android Studio to 4.0. I had initially delayed the upgrade because there was a communication that the recent version is not compatible with Firebase and Kotlin. Now after the upgradation I had to reconnect android studio to Firebase and the dependencies were set up again. What I find is that the recent Firebase updates has specific libraries for Kotlin. For instance in Realtime Database we have implementation 'com.google.firebase:firebase-database-ktx:19.3.1' as against implementation 'com.google.firebase:firebase-database:19.3.1' for Java.
However, the Firebase assistant in Android Studio implements the java versions of the library. Is this a bug? I am confused. Do I change manually to the Kotlin specific libraries?
ktx librarys are extensions librarys that have kotlin syntax. Thats mostly it.
ktx has kotlin syntax and the normal ones have java syntax.
You can read more here. https://developer.android.com/kotlin/ktx

Do all my dependencies (libraries that I am using) for my android studios project have to be using a Gradle version equal to or less than mine?

So let's say I have an application on android studios using Gradle version 4.1 with Gradle plugin version of 3.0. I have added implementation 'com.facebook.android:facebook-login:8.2.1' to my build.gradle file. However com.facebook.android:facebook-login:8.2.1 is using Gradle version 4.4.
So the only way for me to use this library (and that version) is if my project is on Gradle version 4.4 or greater?
Or is there a way for me to use that library (and that version) without changing my Gradle version?
Thanks.
Update: More Info
So specifically I am talking about using the stripe API. I was on version 6.1.2 but because of some new EU law, I need to update the version I am using to at least 9.1.1.
I noticed the only time I get this error 'apptransformClasseswithdesugarfordebug' when trying to run my app, is after they update there Gradle to use version 3.4.1 from 3.4.0 (not the Gradle plugin). On version of Stripe 9.0.0, my app is able to run, however, after switching to version 9.1.1, I get that error.
Note, my project is on Gradle version 3.1.4 and when it's on Stripe version of Gradle 3.4.0, my app is able to run.
So to wrap it up, I need to know if I need to be on the same version, although I doubt it because my app works with 9.0.0 of Stripe, which is using a different version of Gradle.

How to find latest compatible firebase library versions for android

I am using firebase in my android app. I have added firebase-messaging, firebase-database, firebase-auth, and firebase-storage libraries to my build.gradle.
When a new version of these libraries is available, Android Studio suggests to update the version to the new one.
But, the problem is that the latest versions of these four firebase libraries are not the same. Following were the versions when I last updated them to the latest version
My question is, if I update the firebase libraries to the latest versions available at a certain time, are they compatible with each other? Is it OK to update the library versions to the latest without doing any further investigations about the version compatibility?
The latest versions of everything should be compatible with each other. You can see them all listed in the documentation. The Play services gradle plugin will check to see if there are any possible incompatibilities between versions.
Line with yellow highlight you can see warning, they describes the latest library, and yes when firebase firm put library for end developers they also consider the old version features and other stuff, means they doesn't remove all features but they includes new features with new one version, so that is ok and no need to worry about updating a new version of firebase libraries.

All gms/firebase libraries must use the exact same version specification but firebase doc gave me different version

My Android Studio giving me an error see below images
but firebase doc gave me a different version of many libraries, here is the doc
So my question is if firebase doc gives me this different version of libraries then why is android studio giving me this error?
Upgrade the version of the version of the google services gradle plugin to the latest in you top-level build.gradle:
classpath 'com.google.gms:google-services:4.0.1'
This is the plugin that checks for proper versions. Only newer versions of this plugin understand the new versioning system of the libraries.
Use the following google service plugin:
classpath 'com.google.gms:google-services:4.0.1'
and upgrade firebase invites:
implementation 'com.google.firebase:firebase-invites:16.0.1'
As per one of comment suggested, Upgrading an Android Studio and Gradle version Did solve my problem, Previously I was using Android Studio 3.0 and after upgrading to Android Studio 3.1.3 this error was gone.
Below are the changes that I have made.
Updated Android Studio from 3.0 to 3.1.3
Updated Gradle Version to 4.4
If this will not fix your problem then try to upgrade your Google plugin version to the latest one
classpath 'com.google.gms:google-services:latest.version'

How to identify Android Support Library versions in gradle?

Whenever a new Android Support Repository is released, I have to update my dependencies in the app Gradle file.
dependencies {
compile 'com.android.support:support-v4:25.1.1'
}
However, I don't get much of a clue as to what version to add i.e.: 25.1.1 with every release unless I go and check the Recent Support Revisions.
The version shown in the Android SDK Manager: Android Support Repository, revision 44.
I want to know how to get the right version given the revision number of the Android Support Repository during updates.
All other version such as Build tools show the right corresponding versions, only this one stumps me.
You can use the latest.release suffix in for your libraries like this:
compile 'com.android.support:support-v4:latest.release'
It will insure you are always using the latest release version.
The revision number isn't really that important.
The support library major version should match the compileSdk.

Categories

Resources