Cordova plugins manual installation

泄露秘密 提交于 2019-12-12 11:52:30

问题


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:


  1. Download Plugin from the github.

  2. Add source files to your project

  3. change config.xml and androidmanifest.xml file(take the reference of plugin.xml file in downloaded plugin folder).

  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!