xcode Cordova IOS 构建错误(干净的项目)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22023142/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:41:51  来源:igfitidea点击:

Cordova IOS Build Errors (Clean project)

iosobjective-cxcodeapachecordova

提问by Erlend Ellingsen

I have build errors (whenever I try to run the cmd "cordova build ios" or "cordova run ios") the following errorlogs are dumps from "cordova build ios -d".

我有构建错误(每当我尝试运行 cmd“cordova build ios”或“cordova run ios”时),以下错误日志是来自“cordova build ios -d”的转储。

Here's the error-log i had: http://pastebin.com/WdN7YGBtShorter version is beneath.

这是我的错误日志:http: //pastebin.com/WdN7YGBt下面是更短的版本。

I have tried changing "Build Active Architecture Only"-setting to "YES" on the CordovaLib-XCODEProject (someone said that resolved their issue) without any success. Can anybody assist me in this case?

我曾尝试将 CordovaLib-XCODEProject 上的“仅构建活动架构”-设置更改为“是”(有人说解决了他们的问题),但没有成功。在这种情况下,有人可以帮助我吗?

--------- Error log ---------

--------- 错误日志---------

ld: 110 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld:架构 i386 clang 的 110 个重复符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

** BUILD FAILED **

** 构建失败 **

The following build commands failed: Ld /private/var/root/fearnley_2/platforms/ios/build/emulator/fearnley_2.app/fearnley_2 normal i386

以下构建命令失败: Ld /private/var/root/fearnley_2/platforms/ios/build/emulator/fearnley_2.app/fearnley_2 normal i386

(1 failure)

(1 次失败)

child_process.spawn(/var/root/fearnley_2/platforms/ios/cordova/build,[]) = 65 Error: An error occurred while building the ios project.** BUILD FAILED **

child_process.spawn(/var/root/fearnley_2/platforms/ios/cordova/build,[]) = 65 错误:构建 ios 项目时出错。** BUILD FAILED **

The following build commands failed: Check dependencies (1 failure) ** BUILD FAILED **

以下构建命令失败:检查依赖项(1 次失败)** BUILD FAILED **

The following build commands failed: Ld /private/var/root/fearnley_2/platforms/ios/build/emulator/fearnley_2.app/fearnley_2 normal i386 (1 failure)

以下构建命令失败: Ld /private/var/root/fearnley_2/platforms/ios/build/emulator/fearnley_2.app/fearnley_2 normal i386 (1 failure)

at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)

Erlend-PC:fearnley_2 root#

Erlend-PC:fearnley_2 根#

回答by Andrew Potapov

I was experiencing the same issue. First make sure you remove plugins that you suspect might be causing the build to fail issue. For me it was GAPlugin and network-information plugin. To do that run something like:

我遇到了同样的问题。首先确保删除您怀疑可能导致构建失败问题的插件。对我来说,它是 GAPlugin 和网络信息插件。要做到这一点,请运行以下内容:

cordova plugin remove org.apache.cordova.network-information

cordova plugin remove org.apache.cordova.network-information

You can find the list of plugins you have installed in the pluginsdirectory of your project.

您可以在plugins项目目录中找到已安装的插件列表。

To clean out the build area run:

要清理构建区域,请运行:

./platforms/ios/cordova/clean

./platforms/ios/cordova/clean

Then run the build command again:

然后再次运行构建命令:

cordova build ios

cordova build ios