33

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Nilesh Panchal
  • 1,059
  • 1
  • 10
  • 24
  • check this here: https://stackoverflow.com/questions/50149266/compilation-failed-to-completeprogram-type-already-present-com-google-android – Peter Haddad May 03 '18 at 08:14

8 Answers8

18

Update all your Firebase dependencies to use the latest version: 15.0.2
https://firebase.google.com/support/release-notes/android

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
PingForward
  • 313
  • 2
  • 6
  • Thanks @Sergey Ignatyev it's working but is you are using play services than you need to downgrade as version 15.0.2 is not available for playservices – Nilesh Panchal May 03 '18 at 09:46
15

If you aren't using any other play services then upgrade your firebase version to 15.0.2.

if you are, downgrading to 12.0.1 will work.

Make sure to stick to play service 3.2.1 since 3.3.0 will still crash firebase-config.

Berry M.
  • 469
  • 1
  • 4
  • 17
Brijesh Joshi
  • 1,817
  • 1
  • 9
  • 24
4

On 2nd of May there is a new release that allow the below

Firebase Android SDKs now have independent version numbers, allowing for more frequent, flexible updates.

So I think now we need to used different versions according to each module, check release notes pages to latest released details https://firebase.google.com/support/release-notes/android

2

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

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
2

Just update google-services to 3.2.1 with 3.3.0 might be some problems

classpath 'com.google.gms:google-services:3.2.1'

and firebase-messaging to 15.0.2

implementation 'com.google.firebase:firebase-messaging:15.0.2'
Yuri Misyac
  • 4,364
  • 2
  • 16
  • 32
  • This does not work if you use firebase-config. Firebase config crashes even if FirebaseApp has been initialised. The best for now is to downgrade until 15 is stable – Tristan Richard May 03 '18 at 12:18
0

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
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
0

I fixed this issue by -

  • Updating

classpath 'com.google.gms:google-services:3.1.0' to classpath 'com.google.gms:google-services:3.2.1'

Firebase version from 15.0.0 to 15.0.2 for all except firebase auth as it is at 15.1.0

At last I updated google play services version from 15.0.0 to 15.0.1

After all these changes sync your gradle files.

Hope this helps.

Annsh Singh
  • 435
  • 5
  • 12
0

Pretty much the same answer as everyone. You need to update all the firebase and google play services stuff. The thing to take away is that FIREBASE AND GOOGLE PLAY SERVICES VERSION ARE NOT ALWAYS IN SYNC ANYMORE APPARENTLY. So if you are using something like

ext {
    firebase_version = "15.0.2"
}

Just ditch them. For all the versions and stuff,

Louis Tsai
  • 1,587
  • 3
  • 20
  • 33