简体   繁体   English

Phonegap构建不起作用

[英]Phonegap build does not work

I have tried to build my app on Phonegap with plugin and got error for Android: 我试图用插件在Phonegap上构建我的应用,但遇到Android错误:

"Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: LocalNotification.java". “错误-如果使用PhoneGap> = 4.0.0,则必须更新某些官方插件。请升级任何可能包含以下文件的插件版本:LocalNotification.java”。

So i changed the source for plugin from: 所以我从以下位置更改了插件的来源:

 <plugin name="de.appplant.cordova.plugin.local-notification" source="pgb"/> 

to: 至:

 <plugin name="de.appplant.cordova.plugin.local-notification" source="npm" /> 

and now i get error for IOS build that says: 现在我得到错误的IOS构建说:

"Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: de.appplant.cordova.plugin.local-notification" “错误-以下插件,插件版本或该插件的依赖项不在npm上:de.appplant.cordova.plugin.local-notification”

So when i use one source i have build for Android but don't have for IOS, and other source allowes me to build IOS but not Android. 因此,当我使用一个来源时,我已经为Android构建了,但没有针对IOS进行构建,而其他来源允许我构建IOS,但是没有构建Android。 Also if i don't set the version, it should use the latest one, making my first error message unclear to me. 另外,如果我未设置版本,则应使用最新版本,这使我的第一条错误消息不清楚。

What should i do? 我该怎么办?

Double check the version of phonegap you maybe using. 仔细检查您可能使用的phonegap版本。

If you are using the remote build process here and have an old version of phonegap running then your problem maybe that your plugins are configured for a local build not a remote one. 如果您在此处使用远程构建过程并且正在运行版本的phonegap,则可能是您的插件配置为本地构建而不是远程构建的问题。

Basically, this: 基本上,这是:

<plugin name="de.appplant.cordova.plugin.local-notification" source="npm" />

is actually this: 实际上是这样的:

<gap:plugin name="de.appplant.cordova.plugin.local-notification" source="npm" />

with older versions of phonegap. 使用旧版的phonegap。 More info here . 更多信息在这里

Your options maybe to upgrade to a newer version of phonegap or change the plugin declarations as I have shown above. 您可以选择升级到较新版本的phonegap或更改插件声明,如我上面所示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM