Class 'MyFirebaseMessagingService' is not

2019-02-16 06:44发布

Here I have used FirebaseMessagingService in Kotlin but when I run the project it will give me the following error:

Class 'MyFirebaseMessagingService' is not abstract and does not implement abstract base class member public abstract fun zzd(p0: Intent!): Unit defined in com.google.firebase.messaging.FirebaseMessagingService

Any help?

9条回答
▲ chillily
2楼-- · 2019-02-16 07:07

Firebase Android Release Notes

Firebase Core     com.google.firebase:firebase-core:15.0.2
Analytics         com.google.firebase:firebase-analytics:15.0.2
Authentication    com.google.firebase:firebase-auth:15.1.0
Cloud Firestore   com.google.firebase:firebase-firestore:16.0.0
Cloud Messaging   com.google.firebase:firebase-messaging:15.0.2

Unit defined in com.google.firebase.messaging.FirebaseMessagingService

You should Downgrade version. Use 15.0.0.

 com.google.firebase:firebase-****:15.0.0

NOTE

If the problem still coming, You can use stable 12.0.1.

 com.google.firebase:firebase-****:12.0.1
查看更多
冷血范
3楼-- · 2019-02-16 07:13

I have tried everything possible kept my play libraries at version 15.0.0 but switch firebase libraries to 15.0.2 and that still give me this error:

NotificationMessagingService.kt: (8, 1): Class 'NotificationMessagingService' is not abstract and does not implement abstract base class member public abstract fun zzd(p0: Intent!): Unit defined in ......RemoteNotificationMessagingService :app:compileDebugKotlin FAILED

I also tried to switch to using latest google-service plugin 3.3.1, that gives me some weird errors, that make no sense to me!

More than one variant of project :utilities matches the consumer attributes:
  - Configuration ':utilities:debugApiElements' variant android-aidl:
      - Found artifactType 'android-aidl' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
      - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
      - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.

I am running Android Studio 3.2 and it gives me above problems.

Using gradle4-5 and

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-02-16 07:19

We have the same problem with version 15.0.0.
Downgrade to 12.0.1 solves the problem.

查看更多
登录 后发表回答