How do I stop the Failed to run constructor: ReferenceError: PluginManager is not defined error in PhoneGap in Android?
How do I stop the Failed to run constructor: ReferenceError: PluginManager is not defined
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In version 1.0 of PhoneGap they changed the plugins mechanism.
The old way of adding plugins was in the
PhoneGap.addConstructorpart of the javascript file for the plugin.You would have something like
However in newer versions you now do the
addServicestep inside theres/xml/plugins.xmlfile.So in my case I was using the Google Analytics plugin which still uses the old method. It doesn’t seem to do any harm being there as I think it just gets ignored. However, if you want to get rid of the error just comment out the
PluginManager.addService(.....)line in youranalytics.jsfile.