Issue in using custom Cordova plugin with Ionic app


I am trying to use a custom built plugin with my Ionic2 app. I am able to add the plugin using the command - cordova plugin add ‘plugin/path/on/local/machine’. However, when I try to build the app using the command - ionic build android, I am getting below error:

Discovered plugin “MyPluginName” in config.xml. Adding it to the project.
Failed to restore plugin “MyPluginName” from config.xml. You might need to try adding it again. Error: Error: Registry returned 404 for GET on

Could someone help me resolve this issue?


Not helping, sorry, but: This question is pure Cordova. You might want to google for instructions how to build a custom Cordova plugin. There is also a Google group and a Slack for Cordova stuff where you might ask this. (Let us know if you get it solved though!)

Thank you. It is working.

How did you solve it?

Plugin id in plugin.xml had period ( . ). I replaced it with ( - ). This fixed the issue.

1 Like