Cordova plugin not being included in APK when built


I’ve got a bit of a weird one.

I have a plugin that is included in my config and package.json and I can verify that the files for the plugin exist.

However, when I try and build the application the plugin is not available in the completed APK build.

I get the error for the missing plugin reported via the console.

Any ideas?

You should show that console message to us.

If you sure the plugin installed, I think you call the plugin before platform ready.

Hey thanks for trying to help.

Its actually a large project that has had FCM running for over 6 months.

So for more context. I’ve got a new developer that cant FCM to build into the APK viz he has the app from the repo but when he runs ionic cordova run android with the emulator open the FCM plugin is not found as reported by a console message.

I’ll get him to update with the error messsage.


I am colleague for baadier. I have posted the error message below.
Error message

Native: tried calling FCM.onNotification, but the FCM plugin is not installed.

Install the FCM plugin: ‘ionic cordova plugin add cordova-plugin-fcm’


if you have run

$ ionic cordova plugin add cordova-plugin-fcm
$ npm install --save @ionic-native/fcm

Only one thing I can think of is you not use your plugin in

platform.ready().then(() => {

if you already use in platform.ready I don’t know what else can cause this problem.
or can you try run on real device see if it is the sam.


Thanks for the above steps.

We have already implemented the above steps before the build.