Ionic with firebase crashes on Android

I made an app using Ionic 3 and firebase. It’s working fine. Then, I needed another app with only the name changed, so I duplicated the code base of the previous app and changed package name. The issue is that it crashes on Android after launch.

Stack Trace:

FATAL EXCEPTION: main
                                                                        Process: com.hssconnect.android, PID: 20299
                                                                        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hssconnect.android/com.hssconnect.android.MainActivity}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.hssconnect.android. Make sure to call FirebaseApp.initializeApp(Context) first.
                                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
                                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988)
                                                                            at android.app.ActivityThread.-wrap14(ActivityThread.java)
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6682)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
                                                                         Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.hssconnect.android. Make sure to call FirebaseApp.initializeApp(Context) first.
                                                                            at com.google.firebase.FirebaseApp.getInstance(Unknown Source)
                                                                            at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source)
                                                                            at com.google.firebase.messaging.FirebaseMessaging.getInstance(Unknown Source)
                                                                            at com.gae.scaffolder.plugin.FCMPlugin.initialize(FCMPlugin.java:36)
                                                                            at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:57)
                                                                            at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:171)
                                                                            at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:97)
                                                                            at org.apache.cordova.PluginManager.init(PluginManager.java:86)
                                                                            at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:115)
                                                                            at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:149)

EDIT # 1:

Ionic Info:


cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.13.0
    ionic (Ionic CLI) : 3.13.0

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3 ios 4.5.1
    Ionic Framework    : ionic-angular 3.6.0

System:

    ios-deploy : 1.9.2 
    Node       : v8.6.0
    npm        : 2.15.12 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.0 Build version 9A235 

Misc:

    backend : pro

Implementing firebase via fcm plugin

What is your ionic info?
How did you implement firebase?

Updated Topic with info

I would remove the android platform and add it back.
Did you have to and do update any IDs or something for Firebase?

Removed and added android platform. Deleted the platforms folder and added it again.

I added google-services.json file from firebase after creating a project there with new ID

Best Regards,
Salman Tariq.

@SalmanTariq Have you resolved this issue?

@taint2310 yes. Used cordova-push-plugin instead of cordova-plugin-fcm