【问题标题】:Expected method to read dictionary element not found on object of type 'id<NSFastEnumeration,NSObject>'在“id<NSFastEnumeration,NSObject>”类型的对象上找不到读取字典元素的预期方法
【发布时间】:2018-04-09 06:48:02
【问题描述】:

我无法在 Xcode 9.3 上构建我的项目。构建失败。但我正在使用下面的 pod 文件。该问题仅发生在 Pod 文件中。

pod 'PromiseKit/Foundation', '~> 1.5.0'
pod 'PromiseKit-AFNetworking', '~> 0.1.7'

错误:

PMKPromise *promise = promises[key]; ---> error (Expected method to read dictionary element not found on object of type 'id<NSFastEnumeration,NSObject>')

我的项目正在使用 Xcode 9.2 版本。仅发布 Xcode 9.3

【问题讨论】:

    标签: ios objective-c xcode promise cocoapods


    【解决方案1】:

    试试下面的豆荚

    pod 'PromiseKit/Foundation', '~> 1.7.2'
    pod 'PromiseKit-AFNetworking', '~> 0.1.6'
    

    【讨论】:

      【解决方案2】:

      将您的 pod 更新为:

      pod "PromiseKit/Foundation", "~> 6.0.0"  
      pod 'PromiseKit-AFNetworking', '~>0.6.0'  
      

      【讨论】:

      • [!] CocoaPods 找不到 pod "PromiseKit/CorePromise" 的兼容版本:在 Podfile 中:PromiseKit-AFNetworking (~> 0.6) 被解析为 0.6.0,这取决于 PromiseKit/CorePromise ( ~> 3.0) PromiseKit/Foundation (~> 6.0) 被解析为 6.0.0,这取决于 PromiseKit/CorePromise (= 6.0.0)
      • 同样的问题
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-12
      • 1970-01-01
      • 1970-01-01
      • 2021-04-03
      • 1970-01-01
      • 2021-08-30
      相关资源
      最近更新 更多