gpt4 book ai didi

swift - Xcode11 中的 Kingfisher 问题 - 无法找到目标 'Kingfisher' 的模块 'armv7-apple-ios' ;发现 : arm64, arm64-apple-ios

转载 作者:行者123 更新时间:2023-11-30 10:35:42 28 4
gpt4 key购买 nike

使用 Kingfisher 5.7.1,我无法仅为一个类(UIImageView 扩展)导入 Kingfisher。

我可以针对通用 iOS 设备进行构建,但如果我在模拟器或设备上尝试,则会出现导入错误。

我可以导入另一个类,但每次仍然会出错。

Building for device

Building for simulator

我尝试过取消集成 Pod 并重新安装。删除派生数据,重新启动Xcode,重新启动计算机。我仍然遇到同样的问题。

import Foundation
import Kingfisher

extension UIImageView {

public func setImageKF(usingURL url:URL) {
self.kf.setImage(with: url)
}

func layoutImageShadow (shadowImg:UIImageView) {
snp.makeConstraints { (maker) in
maker.top.right.equalToSuperview().offset(1)
maker.width.height.equalToSuperview()
}
}
}

最佳答案

如果你看Kingfisher podspec file ,它有一些最低部署目标:

  s.ios.deployment_target = "10.0"
s.tvos.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.watchos.deployment_target = "3.0"

这意味着这个 Pod 不会在 armv7 devices (iPhone 3GS, 4, 4s, 5, 5c) 中运行无法运行 iOS 10.0。

它也不能在模拟 32 位 armv7 设备的 i386 模拟器中运行。

如果您尝试在arm64构建配置上运行,则会出现更简单的错误消息:

Compiling for iOS 9.0, but module 'Kingfisher' has a minimum deployment target of iOS 10.0:

关于swift - Xcode11 中的 Kingfisher 问题 - 无法找到目标 'Kingfisher' 的模块 'armv7-apple-ios' ;发现 : arm64, arm64-apple-ios,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58083024/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com