【问题标题】:Cant import dependency in xcworkplace cocoapods无法在工作场所 cocoapods 中导入依赖项
【发布时间】:2021-10-27 12:30:41
【问题描述】:

我在 ios 方面相对较新,尤其是可可豆荚。我遇到了一个问题,不知何故 IgListKit 依赖项是不可导入的,我已经清理构建,构建第一个然后添加导入,甚至删除 xcworkplace 并通过执行pod install添加一个新的@

我该如何解决?这是 Pod 内部的问题吗?我应该报错吗?谢谢

我如何添加依赖项:

# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'

target 'LearnViper' do
    pod 'Alamofire', '~> 5.4'
    pod 'RxSwift', '6.2.0'
    pod 'RxCocoa', '6.2.0'
    pod 'Kingfisher', '~> 7.0'
    pod 'SkeletonView'
    pod 'IGListKit', '~> 4.0.0'
end

【问题讨论】:

    标签: ios swift cocoapods


    【解决方案1】:
    platform :ios, '12.0'
    target 'LearnViper' do
    use_frameworks!
    pod 'Alamofire', '~> 5.4'
    pod 'RxSwift', '6.2.0'
    pod 'RxCocoa', '6.2.0'
    pod 'Kingfisher', '~> 7.0'
    pod 'SkeletonView'
    pod 'IGListKit', '~> 4.0.0'
    end
    

    【讨论】:

      【解决方案2】:

      你必须先用命令更新你的 gem 文件

      sudo gem install -n /usr/local/bin cocoapods
      

      然后打开 podfile 添加 pod 并安装

      【讨论】:

      • 已经这样做了,根本没用
      • alamo 和 rx 工作得很好,但 iglistkit 不行
      • 无论如何,我已经安装了 pod,以防你想知道
      【解决方案3】:

      看起来你所要做的就是添加 use_frameworks! 在你的 pod 文件中

      【讨论】:

        猜你喜欢
        • 2017-12-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-11-02
        • 2020-03-26
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多