Unable to build android app due to Firebase (FirebaseInstanceIdService)

Hello! I recently moved an app (ionic 3) from Cordova to Capacitor.
The iOS app worked right away (awesome)

However, it’s been many days that I have been trying to get the Android app working. I indeed got many dependencies errors regarding firebase. I realized that the app was still using cordova firebase plugins so I removed them.

Now, when I build the app, I seem to be getting another dependency issue:
In a file called PushInstanceIDListenerService.java.
It says that FirebaseInstanceIdService cannot be found. I looked up online and saw that this service was deprecated.

I also added the google-services.json file.

My question is: How can I get the application to run given that I am using the latest capacitor version?

This PushInstanceIDListenerService appears unused. When I delete it and run the app on my phone. I have the following error:

I am very confused because everything worked so nicely on iOS.

Articles I read

Thank you so much!!

It seems like this comes from a phonegap plugin. I will try to remove it and tell you what it does :slight_smile:

By the way good job Ionic. XPlatform framework iOS build are very easy (since capacitor). I always had troubles with iOS build. It is now a very nice experience.


Removing the old plugin did not break ionic build. I am now only getting the ERROR CONTEXT messages. I will let you know here if I find anything.

Update: after trying everything in the linked posts, I still have the errors in the second screenshots of my post. I’m wondering if I need to add anything in my app modules related to firebase, because I am not doing that at the moment.

I was using a v4 version of a plugin! This is why I was seeing not a function!

1 Like