体系结构"_OBJC_CLASS _ $ _ AFHTTPClient"的未定义符号; [英] Undefined symbol for architecture "_OBJC_CLASS_$_AFHTTPClient"

查看:52
本文介绍了体系结构"_OBJC_CLASS _ $ _ AFHTTPClient"的未定义符号;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Iam与AFNetwork一起使用cocoapods.当我编译followig错误时出现:

Iam using cocoapods with AFNetwork. When I compile the followig error appears:

Undefined symbols for architecture i386:

  "_OBJC_CLASS_$_AFHTTPClient", referenced from:

对于cocoapod类,无论是64位还是32位,都会发生这种情况.尝试过的解决方法是:

It happens for the cocoapod classes either with 64 bits or 32. Tried solutions from here:

AFNetworking库在iOS 7中失败

在这里:

架构arm64的未定义符号

但是他们不起作用,我错过了什么吗?

but they don't work, am I missing something?

我包含了该项目,但是是否必须以其他方式链接它?

I included the project, but do I have to link it in some other way?

推荐答案

出现此问题是因为JSONKIT的源文件存在弃用的语法问题,自动修复显然阻止了该类的访问,如此处所述 https://stackoverflow.com/a/14191829/2394901 .这是因为pod文件指定:

The problem arises because there is a syntax issue with a deprecation on the source files of JSONKIT, the auto fix apparently prevents the class from being accessed as mentioned here https://stackoverflow.com/a/14191829/2394901. This is in turn is because the pod file specifies:

pod 'AFNetworking', '~> 1.2'

我移除了Pod(请参阅如何从项目中移除CocoaPods?),然后重新安装:

I removed the pod (see How to remove CocoaPods from a project?) and then reinstalled:

$ pod install

使用:

pod "AFNetworking", "~> 2.0"

这篇关于体系结构"_OBJC_CLASS _ $ _ AFHTTPClient"的未定义符号;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆