cordovacordova-pluginsionic2phonegap-pushplugin

Error: Cannot find plugin.xml for plugin "phonegap-plugin-push". Please try adding it again


I am trying to add the phonegap-push-plugin as described in the doc.

I found this thread listing the problem but with no solution given.

As explain in the doc, I did a CLI in [My project folder]: ionic plugin add phonegap-plugin-push --variable SENDER_ID="[project id from Google Developper Console]"

At firts I had issue with Cordova and Cordova-android version. I updated Cordova from 6.3.0 to 6.4.0 and then did a CLI: ionic platform rm android to remove the existing version 5.2 Cordova-android project.

After that when I do a ionic info I get:

And if I do a ionic platform ls I get: Available platforms:

Now the only problem left when I launch ionic plugin add phonegap-plugin-push --variable SENDER_ID="[project id from Google Developper Console]" is this message:

Error: Cannot find plugin.xml for plugin "phonegap-plugin-push". Please try adding it again.

Any idea?


Solution

  • I've finally managed it by switching plugin name (phonegap-plugin-push) by full URL (https://github.com/phonegap/phonegap-plugin-push):

    ionic plugin add https://github.com/phonegap/phonegap-plugin-push --variable SENDER_ID="[project id from Google Developper Console]

    instead of:

    ionic plugin add phonegap-plugin-push --variable SENDER_ID="[project id from Google Developper Console]