0

I was about to create App with handling notifications(Firebase Messaging) in background. I followed the tutorial given in the official Docs. I was getting error while building the app

Error

Even I tried the solution give in the question in stackoverflow, that has no effect because i had many other plugins to be registered for android automatically, they were not working

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_IN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.43.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

dependencies:
  firebase_messaging: ^6.0.13

FCM api version*


implementation 'com.google.firebase:firebase-messaging:20.1.3'

Help me to solve this problem

Nagaraj Vemula
  • 118
  • 1
  • 10

1 Answers1

0

My English isn't so good so feel free to ask me if there is anything unclear.

I solved this problem by this code

override fun registerWith(registry: PluginRegistry?) {        
    GeneratedPluginRegistrant.registerWith(registry as FlutterEngine)
}

I don't know why Because I don't search detail. In my case, this work for me.

I'm happy if it helps for you.