Jemo Mgebrishvili Jemo Mgebrishvili - 3 months ago 411
Android Question

Error "return type int is not compatible with Intent" when using FirebaseMessagingService class

I need FCM service in my application, I can't use FirebaseMessagingService class, it says :

Error:(24, 8) error: zzaa(Intent) in FirebaseMessagingService cannot override zzaa(Intent) in zzb return type int is not compatible with Intent


here is my code

public class MyFirebaseMessagingService extends FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
sendNotification(remoteMessage.getData().get("message"));
}

private void sendNotification(String messageBody) {
//
}
}


I'm using this version of library
compile 'com.google.firebase:firebase-messaging:9.2.0'


enter image description here

Answer

I solved my problem, I was using the latest version of google map and auth services

compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'

when I downgrade version to 9.2.0 problem were solved

Comments