0

I am adding firebase analytics for crash report. while sycnchronizing im am getting below error

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an 
exact version (e.g. "[17.1.1]", but isn't being resolved to that version. Behavior exhibited by the 
library will be unknown. Dependency failing: com.google.firebase:firebase-messaging:17.5.0 -> 
com.google.firebase:firebase-iid@[17.1.1], but firebase-iid version was 20.0.2.The following 
dependencies are project dependencies that are direct or have transitive dependencies that lead to 
the artifact with the issue.

-- Project 'app' depends onto com.google.firebase:firebase-config@16.4.0
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.5.0
-- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.2
-- Project 'app' depends onto com.google.firebase:firebase-messaging@{strictly 17.5.0}
-- Project 'app' depends onto com.google.firebase:firebase-config@{strictly 16.4.0}
-- Project 'app' depends onto com.google.firebase:firebase-iid@{strictly 20.0.2}       
-- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@{strictly 17.2.2}
-- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 17.2.2}
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • 1
    Make sure your dependencies are all up to date with each other. A lot of what you're using is rather old. https://firebase.google.com/support/release-notes/android – Doug Stevenson Jan 23 '20 at 16:42
  • when i add latest version of all the firebase dependencies then FirebaseInstanceIdService error is coming – Pitchai Mari Jan 23 '20 at 16:46

1 Answers1

1

Update all your firebase dependencies to the latest version. Also after you update, you need to update to androidx and use compileSdkVersion 28.

Also related to firebaseinstanceid, you need check the following:

What to use now that FirebaseInstanceId.getInstance().getToken() is deprecated

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134