当我试图构建一个iOS应用程序时,我得到这些错误。

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox normal x86_64
cd /Users/Markus/Development/xcode/totalbox-ios
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -F/Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator -filelist /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreGraphics -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Intermediates/Totalbox.build/Debug-iphonesimulator/Totalbox.build/Objects-normal/x86_64/Totalbox_dependency_info.dat -o /Users/Markus/Library/Developer/Xcode/DerivedData/Totalbox-clpeqwpfvwuhpleeejnzlavncnvj/Build/Products/Debug-iphonesimulator/Totalbox.app/Totalbox

在构建设置中的PODS ROOT:

${SRCROOT}/Pods

我没有创建这个Xcode项目-只是从git中取出它来检查。


当前回答

删除导入cocoapods源代码中除podfile外的所有对应文件/文件夹。

重新安装cocoapod。这将清除来自原始源的任何冗余拉。

其他回答

这个错误

没有为-lRNDateTimePicker找到库

通过将“@react-native-community/datetimepicker”从“^6.3.2”降级为“5.1.0”来解决

希望能有所帮助

我也有这个问题。我的CocoaPods安装出了问题。除KIF外,没有任何吊舱安装正确。我关注了这条线索上的评论,希望能有所帮助。

基本上,我需要确保我的项目和Pods项目的Build Active Architectures Only设置是相等的。

这是我在尝试使用cocoapods将Firebase集成到Xcode项目时遇到的问题

library not found for -lGoogleToolboxForMac
linker command failed with exit code 1 (use -v to see invocation)

经过数小时的搜索和尝试在stackoverflow中列出的各种修复程序后,我的问题终于按以下步骤修复了

转到构建设置,搜索其他链接器标志,删除所有值,除了$(继承)

对所有目标都这样做。

删除pods文件夹。(ios /豆荚) 进行pod更新

瞧!所有链接错误都将消失。

这个与lPods相关的问题可以通过以下步骤修复

选择您的项目目标。 转到“Link Binary With Libraries”中的“Build Phases”。 现在删除”。一个“生成问题的库的文件”。 清洁和构建。

这是可行的。

如果有人在使用Cocoapods安装react-native-fbsdk后来这里解决错误,请记住,你必须在项目构建阶段删除所有其他的.a文件,只保留Cocoapods中名为libPods-WhateverAppName.a的.a文件。

这通常是由运行rnpm link和rnpm的工作方式引起的。

在我从构建阶段删除facebook core .a文件后,我的项目再次启动并运行。