gpt4 book ai didi

ios - Cordova iOS 插件在构建后失败,除非我先删除平台和插件 JSON

转载 作者:技术小花猫 更新时间:2023-10-29 11:01:06 26 4
gpt4 key购买 nike

我有一个 Cordova 3.2.0 项目,我正在通过 USB 使用 XCode 模拟器和 iPhone 4S 进行测试。

当我执行以下命令时,应用程序运行没有错误:

rm -rf platforms/ios
rm plugins/ios.json
cordova platforms add ios
cordova build ios

如果我对我的代码进行任何类型的更改,然后重新运行:

cordova build ios

在 XCode 中启动应用程序时出现以下错误:

ERROR: Plugin 'StatusBar' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2013-12-02 10:50:26.136 treemedia[774:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [ "INVALID", "StatusBar", "_ready", [ ] ]

ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2013-12-02 10:50:26.140 treemedia[774:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [ "Device1738472658", "Device", "getDeviceInfo", [ ] ]

ERROR: Plugin 'NetworkStatus' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2013-12-02 10:50:26.143 treemedia[774:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [ "NetworkStatus1738472659", "NetworkStatus", "getConnectionInfo", [ ] ]

为了不出错地运行应用程序,我必须删除平台和插件 json 文件,然后重新添加 ios 平台并重建。如果我跳过这些步骤而只是重建,这些错误每次都会发生。

自从将 Phonegap/Cordova 从稍早的版本更新到 3.2.0 后,这种情况才开始发生。

最佳答案

In XCode, goto Build Phases -> open the Compiled Sources dropdown. Click + and add the missing plugin .m file that should be in your Plugins directory (but is missing from the compiled sources).

此解决方案来自另一个堆栈溢出答案,此处:https://stackoverflow.com/a/21148428/80254

关于ios - Cordova iOS 插件在构建后失败,除非我先删除平台和插件 JSON,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20326504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com