问题
i tried to install this plugin on my Phonegap app, but the object window.tlantic.plugins.socket seems not to be istantiated. I think it's because when i try to install that plugin with
cordova plugin add com.tlantic.plugins.socket
it can't find it, so i have to use the entire url
cordova plugin add https://github.com/Tlantic/cdv-socket-plugin/
and the installation works but not the plugin. If i build it from build.phonegap.com it returns
Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: com.tlantic.plugins.socket@1
I just tried to install it manually, taking files from the github repository, but i can't make it work in any ways..could you give me some info on how to install manually a plugin in phonegap/cordova applications? Thank you very much.
回答1:
Download Plugin from the github.
Add source files to your project
change config.xml and androidmanifest.xml file(take the reference of plugin.xml file in downloaded plugin folder).
Add plugin js code in your www folder and give the reference in html file.
Hope it will help to you
回答2:
Try uninstalling the app before running with the new source / APK.
来源:https://stackoverflow.com/questions/35942228/cordova-plugins-manual-installation