SDWebImage/UIImageView+WebCache.h file not found

前端 未结 10 2494
予麋鹿
予麋鹿 2020-12-28 21:59

I\'m trying to use SDWebImage in my iPhone app. I followed the step by step tutorial to install SDWebImage into my Xcode project.

When I try to build my app i\'m ge

相关标签:
10条回答
  • 2020-12-28 22:35

    I would not wish my worst enemy the frustration I had to go through to fix this problem because none of these solutions helped in my particular case. If your project compiled earlier, you came back to it and this error popped out of nowhere, chances are you've moved it to some new directory - so go to Build Settings > Search Paths > under Framework Search Paths delete the outdated path, create a new one and set it to "$(SRCROOT)" (without quotes) and change the default "non-recursive" to "recursive". I hope this spares someone the agony I endured.

    0 讨论(0)
  • 2020-12-28 22:35

    Use

    #import "UIImageView+WebCache.h"
    

    instead of

    #import <SDWebImage/UIImageView+WebCache.h>
    

    Will solve it.

    0 讨论(0)
  • 2020-12-28 22:36

    I had .xcodeproj and .xcworkspace files and launched the code using .xcodeproj and got this error, but with .xcworkspace it worked fine

    0 讨论(0)
  • 2020-12-28 22:38

    It may happen that:

    Unzipping this framework, the directory name may be the following: "SDWebImage-3.3.framework"

    If you import the project this way, causes the error "framework SDWebImage not found" when compiling.

    You need renaming, deleting "-3.3". Would be: "SDWebImage.framework"

    Forcing the renamed from Xcode, causes a bug that close unexpectedly the IDE. Renames from Finder and add framework again.

    I hope it's useful ...

    0 讨论(0)
提交回复
热议问题