Edit for clarification:
The
you see in some of the files below is not actually part of the files, but it includes the company name
If your plugins don't work you can also try these steps:
cordova plugin list;
cordova plugin remove my-cordova-plugin --save;
cordova plugin add my-cordova-plugin --nosave;
Also be aware of the following plugin dependencies:
file
, file-transfer
, and camera
plugins are all dependent on the compat
plugin; so compat
needs to be removed last.file-transfer
plugin is dependent on file
, so file
needs to be removed first. Today I learned another cause why this can break: Ensure that your project does not have a second file named cordova.js
, no matter where. If the cordova plugin management finds such a file included as tag, it can wrongly assume that your own file’s base path is the base path of Cordova’s cordova.js
and uses it as base path for loading its own JS files.
Checklist: Is your plugin loaded?
index.html
load the cordova.js
script? (i.e. if you have www/index.html
then you can just reference cordova.js
. This file is not in the www
directory, but automatically generated by Cordova and inserted in your app)cordova plugin ls
: Is your plugin listed?plugins/android.json
: Is your plugin listed?platforms/android/assets/www
have all files? (i.e. a plugins
folder with scripts, cordova_plugins.js
should mention your plugin, a platform-specific cordova.js
)Can you listen to the deviceready
event to check if Cordova initializes at all? (If all scripts are in place)