[英]clang: error: linker command failed with exit code 1, react-native
I am trying to build an archive of my iOS app, but the following linker error occurs: 我正在尝试建立我的iOS应用程序的存档,但是发生以下链接器错误:
Apple Mach-O Linker (ld) Error Group clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have several Pod and react-native dependencies. 我有几个Pod和react-native依赖项。 and am able to build the app for running on both a simulator and a physical device. 并能够构建可在模拟器和物理设备上运行的应用程序。
How do I resolve this issue? 我该如何解决这个问题?
我删除了该对象,然后将一些第三方React Native依赖项重新添加到该项目中,并且还链接了库,现在可以构建它了。
In case, if anyone is having this issue during archiving only, go to project > pod > targets
. 如果任何人仅在归档过程中遇到此问题,请转到project > pod > targets
。 You will see React
in the list, delete the React
, clean the project, and then try archiving. 您将在列表中看到React
,删除React
,清理项目,然后尝试存档。 Hope it will work. 希望它能工作。 Most of the times it happens during archiving and throws warning of duplicate
. 大多数情况下,它是在归档期间发生的,并会发出duplicate
警告。 By deleting the React
from the pod
fix the problem. 通过从pod
删除React
,可以解决此问题。
Delete node_modules folder and yarn.lock file 删除node_modules文件夹和yarn.lock文件
npm install
Or yarn install
npm install
或yarn install
run 跑
react-native link
finally run 终于跑了
react-native run-ios
this worked for me. 这对我有用。
Hope so it will help someone 希望能对某人有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.