Cordova插件手动安装

时间:2016-03-11 14:02:44

标签: cordova phonegap-plugins cordova-plugins phonegap-cli

我尝试在我的Phonegap应用中安装this plugin,但对象 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应用程序中手动安装插件的信息?非常感谢你。

2 个答案:

答案 0 :(得分:5)

  1. 从github下载插件。

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

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

  4. 在www文件夹中添加插件js代码,并在html文件中提供参考。

  5. 希望它对你有所帮助

答案 1 :(得分:0)

尝试在使用新的源/ APK运行之前卸载应用程序。

相关问题