I added Firebase Cloud Messaging to my Android app and I'm upgrading my old app from GCM to FCM. I tried the sample app by following the steps in Firebase Console, which works fine.
After embedding same code into the existing code in my app, even though the build is successful, while trying to run the app on a device in Android Studio, I get this error:
getting the error: more than one library with package name 'com.google.android.gms'.
See the dependencies screenshot taken from terminal. I checked the dependencies using
command >gradlew -q dependencies project name:dependencies --configuratio
n compile
Here is the result:
Any suggestion is appreciated.
Previously some modules in my app was using old jar files of googleplayservices.
After using google play services with same version like below
I hope it will help some one needed.