Ionic 4 + Capacitor - Error while building Android app

(why isn’t there an “ionic-v4” category in the forum ?)

I am building my first Ionic 4 with Capacitor app, and tried to build the Android native app. I run ionic build, followed by ionic cap sync and then ionic cap open android.
Android studio opens and loads the project, and then I get an error:

Failed to notify dependency resolution listener.
The library is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 11.6.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

I am using Firebase Realtime Database, Firebase Auth and Firebase Push Notifications.

As I’m new to all this, any hints on how to fix much appreciated.


update: I tried all possible solutions I could find on the net, including removing node_modules and android folder and rerunning npm install and ionic cap add android, ionic build and ionic cap sync, but the problem still persists…

Any help?

Dont think removing/adding will solves it, looks like a typical Android SDK or whatever libs conflict. Like one lib request such version and the other such version. In Cordova to try to solve the issue I would play with the file, in Capacitor I guess it’s something in the cradle configuration

For Capacitor support you could maybe have a try to post your question on the Slack channel

Thanks for the suggestion. I’ll do that! Thanks :slight_smile:

Are you using a bunch of plugins to do the firebase stuff or just the single firebase plugin. @ionic-native/firebase/ngx seems to be working OK for us (ionic v4) but had to wrestle it a bit initially because I also had FCM and other firebase plugins installed.

1 Like

There were two entries in the configuration that referred to phonegap libraries for some reason. I removed those and the project built! Many thanks !


What was it that you removed, can you perhaps drop some more details as I am sitting with this exact issue now myself.


In package.json, I removed these two lines under “dependencies”:
“phonegap-plugin-multidex”: “^1.0.0”,
“phonegap-plugin-push”: “^2.2.3”,

Hope it helps :slight_smile:

1 Like

That makes absolutely no sense, seeing as that was installed by the plugins the cods instruct us to install, but WTF hey, it works, shots man.

1 Like

Anyone has a solution ? I’m facing the same issue with same plugins, but there is no phonegap occurence in my pakcage.json.