TransWikia.com

Issue : Cant resolve symbol 'firebasemessaging'

Stack Overflow Asked by Sarvesh Dalvi on November 16, 2021

I am using Firebase Cloud Messaging for getting notifications. I was getting proper notifications when my app was running but when my app was in background, I used to get this exception on arrival of the notification :

enter image description here

After some digging I got a solution for this where they performed the following changes :

My MyActivity.java :

package ......;    /* Package Name*/

import android.os.Bundle;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        GeneratedPluginRegistrant.registerWith(this);
    }
}

Application.java :

enter image description here

GeneratedPluginRegistrant.java

enter image description here

And I changed the ‘android:name’ of tag form "io.flutter.app.FlutterApplication" to ".Application" accordingly :

enter image description here

Now as you can see in the screenshots provided above ….. I am getting errors saying cannot revolves symbol ‘Firebasemesseging’ etc. (Same ‘Cannot resolve’ everywhere). Can anyone please help me to fix this error. I am a bit new to Flutter hence I am not sure how to solve this.

Thanks a lot in advance for the help.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP