我的应用程序中需要FCM服务,不能使用FirebaseMessagingService类,它表示:
Error:(24, 8) error: zzaa(Intent) in FirebaseMessagingService cannot override zzaa(Intent) in zzb return type int is not compatible with Intent
这是我的代码
public class MyFirebaseMessagingService extends FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
sendNotification(remoteMessage.getData().get("message"));
}
private void sendNotification(String messageBody) {
//
}
}
我正在使用此版本的库 compile 'com.google.firebase:firebase-messaging:9.2.0'
我解决了我的问题,我正在使用最新版本的Google Map和Auth服务
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
当我将版本降级到9.2.0时,问题解决了
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句