9

I'm tring to integrate Firebase Cloud Messaging in android app but facing problem to extend FirebaseMessagingService in our class.

It displaying Can not resolve symbol "FirebaseMessagingService"

app.gradle

compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:9.8.0'

and also add google-service.json file

2
  • 2
    Please always use a single version of all Firebase dependencies. Mixing versions is a recipe for headaches. Dec 16, 2016 at 15:10
  • @FrankvanPuffelen thanks for ur valuable comment
    – Garg
    Dec 17, 2016 at 6:22

4 Answers 4

16

you also need to add

compile "com.google.firebase:firebase-messaging:$PLAY_SERVICES_VERSION"
1
5

You have to add another dependency:

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

Check the official doc.

2
dependencies {    
      implementation 'com.google.firebase:firebase-messaging:21.0.0'
}
0

Add these dependencies it will solve your problem

dependencies {
 compile 'com.google.firebase:firebase-core:9.0.0'
 compile 'com.google.firebase:firebase-messaging:9.4.0'
 }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.