PhoneGap构建错误“插件不受支持:..." [英] PhoneGap build error "plugin unsupported: ..."

查看:153
本文介绍了PhoneGap构建错误“插件不受支持:..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下config.xml导致错误:

<?xml version="1.0" encoding="UTF-8" ?> 
<widget  xmlns="http://www.w3.org/ns/widgets"  xmlns:gap="http://phonegap.com/ns/1.0"  id="LogIn"  version="1.0.1"  versionCode="10" > 
<name>...</name>
<description>...</description>
<author >...</author>
<preference  name="phonegap-version"  value= "3.5.0"  />
<preference  name="orientation"  value= "default"  />
<preference  name="target-device"  value= "universal"  />
<preference  name="fullscreen"  value= "true"  />
<preference  name="webviewbounce"  value= "true"  />
<preference  name="android-installLocation"  value= "internalOnly"  />
<preference  name="splash-screen-duration"  value= "0"  />
<preference  name="load-url-timeout"  value= "20000"  />
<access  origin="*"  />

<feature  name="http://api.phonegap.com/1.0/notification"  />
<feature  name="http://api.phonegap.com/1.0/file"  />
<feature  name="http://api.phonegap.com/1.0/media"  />
<feature  name="http://api.phonegap.com/1.0/battery"  />
<feature  name="http://api.phonegap.com/1.0/camera"  />
<feature  name="http://api.phonegap.com/1.0/contacts"  />
<feature  name="http://api.phonegap.com/1.0/geolocation"  />
<feature  name="http://api.phonegap.com/1.0/network"  />

<gap:plugin  name="org.apache.cordova.dialogs" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.device" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.device-orientation" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.splashscreen" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.camera" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.device-motion" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.network-information" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.battery-status" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.vibration" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.geolocation" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.globalization" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.file" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.inappbrowser" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.media" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.media-capture" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.contacts" ></gap:plugin>
<gap:plugin  name="org.apache.cordova.file-transfer" version="0.4.3" ></gap:plugin>

<plugin name="cordova-plugin-file-opener2" source="npm" />

</widget>

错误消息:

错误图片

代码库是继承的,据我了解,该配置用于正确编译.删除错误中的插件会导致列表中以下插件在错误中的位置.

The codebase is inherited and as I understand, the configuration used to compile correctly. Removing the plugin in the error results in the following plugin on the list taking its place in the error.

更改

<preference  name="phonegap-version"  value= "3.5.0"  />

<preference  name="phonegap-version"  value= "3.7.0"  />

并从中格式化插件

<gap:plugin  name="org.apache.cordova.dialogs" ></gap:plugin>

<gap:plugin  name="org.apache.cordova.dialogs" source="npm" ></gap:plugin>

似乎允许它构建,但是插件在应用程序中不起作用.

seems to allow it to build, but the plugins do not function in the App.

任何人和所有帮助或建议都将不胜感激.

Any and all help or suggestions will be greatly appreciated.

推荐答案

对于遇到相同问题的任何人,我都找到了解决方案:

它可以归结为:

转到: PhoneGap插件页面

(这里我以通讯录为例),然后单击[旧插件]选项卡.现在找到您的插件,并在[PBG插件ID]列下打开其链接.使用

(I'm using contacts as an example here) and click on the [Old Plugins] tab. Now find your plugin and open its link under the [PBG Plugin ID] column. Use the

<plugin name="org.apache.cordova.contacts" spec="0.2.16" source="pgb" />

(如[使用说明]中所述),并将source="pgb"替换为source="npm".

as described under [Usage Instructions] and replace source="pgb" with source="npm".

如果此操作失败,请在开始对NPG使用PhoneGap使用NPM"文章上方的注释中使用选项3",在此您可以使用插件中PhoneGap插件页面[Other Details]下的[Repository]链接,如下所示:

If this fails, make use of "Option 3" on the comments above "Start Using NPM for PhoneGap" artice where you use the [Repository] link under [Other Details] on your PhoneGap Plugin page in your plugin like so:

<plugin spec="https://github.com/apache/cordova-plugin-contacts.git" source="git" />

我希望这可以节省几个人几个小时!

I hope this saves a few people a couple of hours!

这篇关于PhoneGap构建错误“插件不受支持:..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆