离子应用程序构建失败,错误'链接器命令失败,退出代码1(使用-v看到调用)' [英] ionic app build fails with error 'linker command failed with exit code 1 (use -v to see invocation)'

查看:156
本文介绍了离子应用程序构建失败,错误'链接器命令失败,退出代码1(使用-v看到调用)'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试使用 ionic运行时生成ios -lc 我在终端中看到以下错误:

When attempting to build using ionic run ios -lc I am seeing the following error in terminal:

** 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看到调用) code>

When attempting to build the same app in xCode I am seeing the error linker command failed with exit code 1 (use -v to see invocation)


  • 我已移除并添加了ios平台

  • 更新ios-deploy

  • 我更新了ios-sim

  • 我重新启动了Xcode


  • I've removed and added the ios platform
  • I've updated ios-deploy
  • I've updated ios-sim
  • I've restarted Xcode
  • I've restarted my machine Xcode is up to date
  • I can build other projects successfully

推荐答案

Xcode错误链接器命令失败,退出代码1(使用-v看到调用)使我到这个堆栈溢出回答

The Xcode error linker command failed with exit code 1 (use -v to see invocation) led me to this stack overflow answer

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

The second answer there suggests a check for multiple / duplicate .m files in the Xcode project Compile Resources:


如果在目标的编译阶段中的编译源部分多次引用相同的.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,确实有一个重复的调用插件资源。

So I had a check in Xcode and there was indeed a duplicate call to a plugin resource.

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

After checking package.json I found the same plugin was referenced in two ways (with two paths).

删除两个插件中的一个解决了此问题。

Removing one of the two plugins resolved the issue.

这篇关于离子应用程序构建失败,错误'链接器命令失败,退出代码1(使用-v看到调用)'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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