没有这样的模块'SDWebImage'

时间:2016-03-09 18:38:30

标签: ios swift2 cocoapods sdwebimage

我使用SDWebImage安装了CocoaPods

我的podfile与https://github.com/rs/SDWebImage

中的内容一样
platform :ios, '8.0'
use_frameworks!
pod 'SDWebImage', '~>3.7'

当我导入SDWebImage时,它说

  

没有这样的模块'SDWebImage'

我的Xcode版本是:版本7.2.1

5 个答案:

答案 0 :(得分:4)

使用新的<YourProject>.xcworkspace代替<YourProject>.xcodeproj

xcworkspace包含project以及pods之后的pod install

答案 1 :(得分:2)

在导入代码中的任何新pod之前构建项目

答案 2 :(得分:1)

  

-ObjC中添加Other Linker Flags

enter image description here

答案 3 :(得分:0)

您可以像这样将其添加到podfile中

platform :ios, '8.0'
# Uncomment the next line when you want all Pods as static framework
# use_modular_headers!
pod 'SDWebImage', :modular_headers => true

platform :ios, '8.0'
use_frameworks!
pod 'SDWebImage'

答案 4 :(得分:0)

对我来说,在podfile中取消注释此行:

#use_frameworks! -> use_frameworks!

相关问题