Cannot resolve symbol “FirebaseInstanceId”

Tags: ,



I am trying to use FirebaseInstanceId but keep getting the error

“Cannot resolve symbol FirebaseInstanceId”.

The modules gradle includes

dependencies {
    compile 'com.google.firebase:firebase-messaging:+'
    compile 'com.google.firebase:firebase-iid:+'
}

The only thing which exists on com.google.firebase.iid seems to be .zzb. Am I missing something?

Answer

Make sure you have all of these

 implementation 'com.google.firebase:firebase-core:17.2.1'

 implementation 'com.google.firebase:firebase-messaging:20.0.0'
 implementation 'com.google.firebase:firebase-auth:19.1.0' // not necessary(required for signout and sign in)

Just this much is required.



Source: stackoverflow