-1

I am trying to extends FirebaseMessagingService base class but it unable to import.Please find the build.gradle(project) and build.gradle(app)

dependencies { classpath 'com.android.tools.build:gradle:2.1.2' classpath 'com.google.gms:google-services:3.0.0' }

dependencies {compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'

compile 'com.google.firebase:firebase-core:9.0.2'
apply plugin: 'com.google.gms.google-services'}

Thanks in advance.

Robert
  • 29
  • 5
  • Possible duplicate of [Cannot find symbol "messaging" in com.google.firebase.messaging.FirebaseMessagingService](http://stackoverflow.com/questions/38631572/cannot-find-symbol-messaging-in-com-google-firebase-messaging-firebasemessagin) – Diego Giorgini Sep 17 '16 at 18:02

2 Answers2

1

Remove apply plugin: 'com.google.gms.google-services' this line and add outside of dependency

Yogesh Rathi
  • 6,331
  • 4
  • 51
  • 81
1

Add

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

below this line:

compile 'com.google.firebase:firebase-core:9.0.2'
hering
  • 1,956
  • 4
  • 28
  • 43
DeC
  • 31
  • 2