1

I create a new empty project in android studio 3.1.
I bring up the Firebase Assistant and select Firebase Cloud Messaging.
I connect this new project to my Firebase Project.
I complete the process to add FCM to my app.
I build the project.

It has errors. It doesn't like . . .

implementation 'com.android.support:appcompat-v7:27.1.1'

in the dependencies section of my build.gradle. The reason is because it found

+--- com.android.support:support-media-compat:25.2.0@aar

in the machine generated androidDependencies section. It says that "All com.android.support libraries must use the exact same version.

I haven't even added a line of code to this project - it was born with this error. What is the fix for this?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Dean Blakely
  • 3,535
  • 11
  • 51
  • 83
  • That should mostly be a warning and not an error. Are you able to build the project? – Vijay Apr 13 '18 at 20:46
  • Yes, the project will build but I'm taking the warning seriously. It's saying I should not use different versions in the same project. The project is getting generated with this problem. – Dean Blakely Apr 13 '18 at 20:57
  • I get it. The problem is with the version difference between the Firebase and Android library version. Check out what's the latest version of Firebase libs and try using that with the latest versions of Android libs available. That should solve the issue. If you could find a matrix of what Firebase version runs well with the Android libs, it would be great. I personally give up on the warnings as they Don't seem to affect my work much. – Vijay Apr 13 '18 at 21:01

0 Answers0