Error in Phonegap Application: Uncaught module cordova/plugin_list already defined Error in Phonegap Application: Uncaught module cordova/plugin_list already defined android android

Error in Phonegap Application: Uncaught module cordova/plugin_list already defined


One cause of this problem is importing the cordova_plugins.js in your html file.

Check if it is the case for you and remove it.


The file cordova.js automatically loads cordova_plugins.js.

So another obvious way to end up with this error is if you inadvertently put the following code twice on your page.

<script type="text/javascript" src="cordova.js"></script> 

I lost hours on this same error only to realise I had added cordova.js at both the top and the bottom of the page.


You must have to create and deploy any phonegap project/application using Phonegap Command Line Interface

To Create any project write following command on command line:

$ phonegap create <path> <package_name> <project_name>

i.e.

$ phonegap create hello com.example.hello HelloWorld

To add any platform to your project:

cd <path_to_project>$ phonegap build <platform>

i.e.

cd hello$ phonegap build ios$ phonegap build android

To add any plugin feature to your project:

cd <path_to_project>$ phonegap local plugin add <path_to_plugin>

i.e.

cd hello$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git