ios- Apple Mach-O 链接器错误



所以我在我的xCode项目上使用pod deintegrate,然后当我随后执行pod install时,我得到以下构建时错误。

我不知道为什么会发生这种情况,它在我解体之前就已经起作用了。 Apple Mach-O 链接器错误组

我尝试清理项目并删除并重新添加视图控制器,这是其他答案中建议的。没用。

  "type metadata accessor for Alamofire.Result", referenced from:
  "Alamofire.(request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest).(default argument 1)", referenced from:
  "Alamofire.(request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest).(default argument 2)", referenced from:
  "SwiftyJSON.JSON.init (Any) -> SwiftyJSON.JSON", referenced from:
  "protocol witness table for Swift.Int : SwiftyJSON.JSONSubscriptType in SwiftyJSON", referenced from:
  "SwiftyJSON.JSON.subscript.getter : ([SwiftyJSON.JSONSubscriptType]...) -> SwiftyJSON.JSON", referenced from:
  "Alamofire.Result.value.getter : A?", referenced from:
  "protocol witness table for Swift.String : Alamofire.URLConvertible in Alamofire", referenced from:
  "protocol descriptor for SwiftyJSON.JSONSubscriptType", referenced from:
  "protocol witness table for Alamofire.JSONEncoding : Alamofire.ParameterEncoding in Alamofire", referenced from:
  "SwiftyJSON.JSON.arrayValue.getter : [SwiftyJSON.JSON]", referenced from:
  "static Alamofire.JSONEncoding.default.getter : Alamofire.JSONEncoding", referenced from:
  "Alamofire.(request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest).(default argument 3)", referenced from:
  "type metadata for Alamofire.JSONEncoding", referenced from:
  "static SwiftyJSON.JSON.null.getter : SwiftyJSON.JSON", referenced from:
  "Alamofire.(request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest).(default argument 4)", referenced from:
  "Alamofire.request (Alamofire.URLConvertible, method : Alamofire.HTTPMethod, parameters : [Swift.String : Any]?, encoding : Alamofire.ParameterEncoding, headers : [Swift.String : Swift.String]?) -> Alamofire.DataRequest", referenced from:
  "type metadata for SwiftyJSON.JSON", referenced from:
  "Alamofire.DataRequest.(responseJSON (queue : __ObjC.DispatchQueue?, options : __ObjC.JSONSerialization.ReadingOptions, completionHandler : (Alamofire.DataResponse<Any>) -> ()) -> Self).(default argument 0)", referenced from:
  "protocol witness table for Swift.String : SwiftyJSON.JSONSubscriptType in SwiftyJSON", referenced from:
  "Alamofire.DataRequest.(responseJSON (queue : __ObjC.DispatchQueue?, options : __ObjC.JSONSerialization.ReadingOptions, completionHandler : (Alamofire.DataResponse<Any>) -> ()) -> Self).(default argument 1)", referenced from:
  "Alamofire.DataRequest.responseJSON (queue : __ObjC.DispatchQueue?, options : __ObjC.JSONSerialization.ReadingOptions, completionHandler : (Alamofire.DataResponse<Any>) -> ()) -> Self", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)`

碰巧的是,这里发布的答案对我有用!

在Xcode中打开"产品"菜单下拉菜单并按住"选项","清理"将变为"清理构建文件夹">

最新更新