加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – 离子应用程序构建失败并显示错误’链接器命令失败,退出代

发布时间:2020-12-14 19:34:36 所属栏目:百科 来源:网络整理
导读:当尝试使用离子运行ios -lc构建时,我在终端中看到以下错误: ** BUILD FAILED **The following build commands failed: Ld build/emulator/xXxXxXx.app/xXxXxXx normal i386(1 failure)Error code 65 for command: xcodebuild with args: -xcconfig,/Users/x
当尝试使用离子运行ios -lc构建时,我在终端中看到以下错误:

** BUILD FAILED **


The following build commands failed:
    Ld build/emulator/xXxXxXx.app/xXxXxXx normal i386
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/cordova/build-debug.xcconfig,-project,xXxXxXx.xcodeproj,ARCHS=i386,-target,xXxXxXx,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/build/sharedpch
Error: /Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/cordova/run: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

尝试在xCode中构建相同的应用程序时,我看到错误链接器命令失败,退出代码为1(使用-v查看调用)

>我删除并添加了ios平台
>我已经更新了ios-deploy
>我已经更新了ios-sim
>我重新启动了Xcode
>我重启了我的机器Xcode是最新的
>我可以成功建立其他项目

解决方法

Xcode错误链接器命令失败,退出代码为1(使用-v查看调用)导致我转到 this stack overflow answer

第二个答案建议在Xcode项目中检查多个/重复的.m文件编译资源:

That can happen if the same .m file is referenced multiple times in your target’s “Compile Sources” section in “Build Phases”. Remove duplicate entries and you should be fine.

所以我在Xcode中检查了一下,确实有一个对插件资源的重复调用.

检查package.json后,我发现同一个插件以两种方式引用(有两个路径).

删除两个插件中的一个解决了这个问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读