Cordova插件手动安装

Giò*_*lla 4 phonegap-plugins cordova cordova-plugins phonegap-cli

我试图在我的Phonegap应用程序上安装此插件,但对象window.tlantic.plugins.socket似乎没有被证实.我认为这是因为当我尝试安装该插件时

cordova插件添加com.tlantic.plugins.socket

它无法找到它,所以我必须使用整个网址

cordova插件添加https://github.com/Tlantic/cdv-socket-plugin/

并且安装有效但不是插件.如果我从build.phonegap.com构建它,它返回

错误 - 以下插件,插件版本或此插件的依赖性不在npm:com.tlantic.plugins.socket@1

我只是尝试手动安装它,从github存储库获取文件,但我不能让它以任何方式工作..你能给我一些关于如何在phonegap/cordova应用程序中手动安装插件的信息吗?非常感谢你.

小智 5

  1. 从github下载插件.

  2. 将源文件添加到项目中

  3. 更改config.xml和androidmanifest.xml文件(在下载的插件文件夹中引用plugin.xml文件).

  4. 在你的www文件夹中添加插件js代码,并在html文件中提供引用.

希望它对你有所帮助