A library that I wrote myLib uses RemoteMessage from Firebase, the app itself also uses Firebase.
Using gradle 4.7
I faced a similar issue in past few days with.
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
solution was to either downgrade to
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
or consider leaving Google Cloud Services and upgrading to FCM entirely
Note that they have different version numbers you can look it up here