cocoapods - ld:找不到框架

时间:2023-01-17 23:53:46

I've been trying to install a pod called SabBar using cocoapods, I've successfully install cocoapods along with the initial setup. But for some reason I'm getting this error during compile time:

我一直在尝试使用cocoapods安装一个名为SabBar的吊舱,我已经成功安装了cocoapods以及初始设置。但由于某种原因,我在编译期间遇到此错误:

ld: warning: directory not found for option '-F/Users/Andy/Library/Developer/Xcode/DerivedData/JymJam-gocrzdctroqhlaedmghajkejcugm/Build/Products/Debug-iphonesimulator/SabBar'

ld:警告:找不到选项'-F / Users / Andy / Library / Developer / Xcode / DerivedData / JymJam-gocrzdctroqhlaedmghajkejcugm / Build / Products / Debug-iphonesimulator / SabBar'的目录

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

ld:找不到框架SabBar clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

I've looked at other solutions but they don't seem to work for me.

我看过其他解决方案,但它们似乎对我不起作用。

This is what my Podfile looks like:

这就是我的Podfile的样子:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target "JymJam" do
    pod 'SabBar'
end

I've tried removing "use_frameworks!" but this doesn't work as my project is swift based.

我试过删除“use_frameworks!”但这不起作用,因为我的项目很快。

3 个解决方案

#1


4  

use_frameworks! is only needed if the Pod has to be imported as a dynamic framework.

use_frameworks!只有在必须将Pod导入为动态框架时才需要。

There are several possibilities:

有几种可能性:

  1. You didn't use the generated xcworkspace file.
  2. 您没有使用生成的xcworkspace文件。

  3. the target name is wrong
  4. 目标名称是错误的

  5. You didn't use the xcconfig files generated by cocoapods
  6. 您没有使用cocoapods生成的xcconfig文件

#2


2  

I fixed this issue by using the following two steps:

我通过使用以下两个步骤修复了此问题:

Firstly go to the project path in terminal then apply the following steps

首先转到终端中的项目路径,然后应用以下步骤

1 : pod deintegrate

1:pod解体

2 : pod install

2:pod安装

#3


1  

I just deleted libPod.a from Target-Build phases and it worked.

我刚从Target-Build阶段删除了libPod.a并且它工作正常。

#1


4  

use_frameworks! is only needed if the Pod has to be imported as a dynamic framework.

use_frameworks!只有在必须将Pod导入为动态框架时才需要。

There are several possibilities:

有几种可能性:

  1. You didn't use the generated xcworkspace file.
  2. 您没有使用生成的xcworkspace文件。

  3. the target name is wrong
  4. 目标名称是错误的

  5. You didn't use the xcconfig files generated by cocoapods
  6. 您没有使用cocoapods生成的xcconfig文件

#2


2  

I fixed this issue by using the following two steps:

我通过使用以下两个步骤修复了此问题:

Firstly go to the project path in terminal then apply the following steps

首先转到终端中的项目路径,然后应用以下步骤

1 : pod deintegrate

1:pod解体

2 : pod install

2:pod安装

#3


1  

I just deleted libPod.a from Target-Build phases and it worked.

我刚从Target-Build阶段删除了libPod.a并且它工作正常。