No static method zzUr() in Firebase when I try to use Analytics with Notifications

try this:

add

compile 'com.google.firebase:firebase-analytics:9.2.0'

and change this:

compile 'com.google.firebase:firebase-messaging:9.0.2'

to THIS (same version on all)

compile 'com.google.firebase:firebase-messaging:9.2.0'

if this doesn't work, put all firebase versions to 9.0.2, or 9.0.0


I had the same issue, as others said I used the same version for all firebase libraries, but it didn't worked:

compile 'com.google.firebase:firebase-core:9.6.0'
compile 'com.google.firebase:firebase-messaging:9.6.0'

I found that I must use the same version for play-services :

compile 'com.google.android.gms:play-services-analytics:9.6.0'
compile 'com.google.android.gms:play-services-base:9.6.0'
compile 'com.google.android.gms:play-services-gcm:9.6.0'

Using Firebase or Google Play Service libraries from different version is not supported. All libraries are proguarded together so the name of internal methods/classes match between different libraries. When you use libraries from different versions you will likely see missing classes and methods (as you do in this case). Mixing libraries from different versions is also not tested. Even if you happen to successfully run the app its very likely things will not work as designed.

Please always use libraries from exactly the same release version.