ios Pod 问题,链接器命令失败,退出代码为 1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37290207/
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
pods issue, linker command failed with exit code 1
提问by MeR8.
when I run my project, I get errors like this:
当我运行我的项目时,我收到如下错误:
It seems that all frameworks in my cocoapods have problem. Is it my problem of my cocoapods? I have reinstalled my cocoapods, and used 'pod setup' or 'pod install' and others, but it doesn't work, and I still have the same errors...
And in Xcode, red 'rd' on the 'Podfile' like this, I don't know if it is related to errors.
我的cocoapods中的所有框架似乎都有问题。是我的可可豆的问题吗?我已经重新安装了我的 cocoapods,并使用了“pod setup”或“pod install”等,但它不起作用,我仍然有同样的错误......在 Xcode 中,“Podfile”上的红色“rd”像这样,不知道是不是跟错误有关。
pod 1.0.0 ruby 2.0.0 xcode 7.3.1 Anyone have the same problem?
pod 1.0.0 ruby 2.0.0 xcode 7.3.1 有人有同样的问题吗?
回答by Bastek
I faced similar problem in my project. After hours of searching I found that in GENERAL settings of the project in section "Linked Frameworks and Libraries" there are two files for pods: "libPods.a"
and "Pods_ProjectName.framework
"
我在我的项目中遇到了类似的问题。经过数小时的搜索,我发现在“链接的框架和库”部分的项目的一般设置中,有两个 pod 文件:"libPods.a"
和"Pods_ProjectName.framework
“
Deleting "libPods.a"
helped in my case.
删除"libPods.a"
对我有帮助。
回答by al_mukthar
This worked for me:
这对我有用:
pod deintegrate
pod install
回答by Pawan Korade
Actually issue is related to dependency management for xcode project. You can refer below answer link for solving "linker issue" in xcode. That worked for me.
实际上问题与 xcode 项目的依赖管理有关。您可以参考以下答案链接来解决 xcode 中的“链接器问题”。那对我有用。
回答by Y.R.
There are can be a few different cases;
可能有几种不同的情况;
Also, it would help to know all information from your print screen :)
此外,了解打印屏幕上的所有信息也会有所帮助:)
Have you tried to clean your delivery data ?
您是否尝试清理您的交付数据?
Go to Xcode -> Preferences -> Open "Location Menu" -> Open Folder With DeliveryData
Close your XCode;(even go to "Force Quit.." menu and close XCode there);
Clean trash bin;
And try build again.
转到 Xcode -> 首选项 -> 打开“位置菜单” -> 使用 DeliveryData 打开文件夹
关闭您的 XCode;(甚至转到“强制退出..”菜单并在那里关闭 XCode);
清洁垃圾桶;
并再次尝试构建。
Second case:
第二种情况:
- Open your target -> Build Settings -> Build Active Architecture Only-> set "No" option
- Do the same with all your pods' target
- 打开你的目标 -> 构建设置 -> 仅构建活动架构 -> 设置“否”选项
- 对所有 Pod 的目标执行相同操作
回答by Mahesh Verma
Try to deleting Podfile.lock file and Pods folder. Then try to pods install.
尝试删除 Podfile.lock 文件和 Pods 文件夹。然后尝试 pods 安装。
回答by Исмаил Хасбулатов
回答by nfek
I spent 2 days to find the real culprit. It turns out that I tried to run the "Project" instead of running the "Workspace". How this will help others!
我花了两天时间才找到真正的罪魁祸首。事实证明,我试图运行“项目”而不是运行“工作区”。这将如何帮助他人!
回答by Prasann
First, you need to check your Xcode version and than check pod version which you installed. If your Xcode version under 9.0 then you should reinstall pod with but old version not latest. It will work.
首先,您需要检查您的 Xcode 版本,然后检查您安装的 pod 版本。如果您的 Xcode 版本低于 9.0,那么您应该使用旧版本而不是最新版本重新安装 pod。它会起作用。
回答by Abdullah Tahan
回答by atalayasa
In my case, I plugged out my real device but in the simulator still it looks Generic iOS device. So I changed it with some simulator and it is fixed.
就我而言,我插入了我的真实设备,但在模拟器中它看起来仍然是通用 iOS 设备。所以我用一些模拟器改变了它,它是固定的。