5

所以,我刚刚更新了我的 xcode 并开始为 iOS 7.1 构建我的应用程序。但现在我发现我的 SDWebImage 坏了。每当我尝试为 UIImageView 设置 ImageWithUrl 时,我的应用程序崩溃并出现以下异常和堆栈跟踪:

2014-03-11 12:55:36.647 Wiggle[1983:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:options:]: unrecognized selector sent to instance 0x10fa12890'


*** First throw call stack:
(
    0   CoreFoundation                      0x0000000103188795 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000102eeb991 objc_exception_throw + 43
    2   CoreFoundation                      0x0000000103219bad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010317a09d ___forwarding___ + 973
    4   CoreFoundation                      0x0000000103179c48 _CF_forwarding_prep_0 + 120
    5   Wiggle                              0x000000010001fe94 -[MenuTableViewController tableView:viewForHeaderInSection:] + 1316
    6   UIKit                               0x000000010182cdb3 __84-[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:]_block_invoke + 112
    7   UIKit                               0x00000001017b60ac +[UIView(Animation) performWithoutAnimation:] + 70
    8   UIKit                               0x000000010182ccc5 -[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:] + 223
    9   UIKit                               0x00000001018149cf -[UITableView _updateVisibleHeadersAndFootersNow:] + 2596
    10  UIKit                               0x0000000101815b6f -[UITableView _updateVisibleCellsNow:] + 3122
    11  UIKit                               0x0000000101826381 -[UITableView layoutSubviews] + 207
    12  UIKit                               0x00000001017bdb27 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354
    13  QuartzCore                          0x0000000100bb7a22 -[CALayer layoutSublayers] + 151
    14  QuartzCore                          0x0000000100bac589 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363
    15  QuartzCore                          0x0000000100bac40a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    16  QuartzCore                          0x0000000100b21694 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252
    17  QuartzCore                          0x0000000100b2270c _ZN2CA11Transaction6commitEv + 394
    18  UIKit                               0x0000000101779444 _afterCACommitHandler + 128
    19  CoreFoundation                      0x0000000103153ff7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    20  CoreFoundation                      0x0000000103153f67 __CFRunLoopDoObservers + 391
    21  CoreFoundation                      0x00000001031336d2 __CFRunLoopRun + 946
    22  CoreFoundation                      0x0000000103132f33 CFRunLoopRunSpecific + 467
    23  GraphicsServices                    0x00000001036a53a0 GSEventRunModal + 161
    24  UIKit                               0x0000000101762043 UIApplicationMain + 1010

我不知道该怎么办,有人可以帮忙吗?

4

2 回答 2

10

感谢 Amar,我找到了答案。

SDWebImage使用 Base SDK iOS 7.1 需要您排除 arm64

项目 > 构建设置 > 架构 > 有效架构。

您可能还需要设置Build Active Architectures OnlyNO它才能工作。

于 2014-03-11T12:34:50.113 回答
1

显然,现在有很多 64 位设备,您不想再这样做了,而是想下载与新架构兼容的最新 SDWeb 库。

于 2014-05-10T17:19:53.893 回答