AFNetworking报错"_UTTypeCopyPreferredTagWithClass", referenced from: _AFContentTypeForPathExtens

问题: 在和Unity交互的过程中,从Unity开发工具打包出来的项目文件,在添加AFNetworking库,运行时报出以下错误:

Undefined symbols for architecture armv7:

"_kUTTagClassMIMEType", referenced from:

-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

"_kUTTagClassFilenameExtension", referenced from:

-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

"_UTTypeCreatePreferredIdentifierForTag", referenced from:

-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

"_UTTypeCopyPreferredTagWithClass", referenced from:

-[AFStreamingMultipartFormData appendPartWithFileURL:name:error:] in AFURLRequestSerialization.o

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

原因是未添加 MobileCoreServices.framework(此框架定义统一类型标识符 (UTIs)使用的底层类型)

解决:Build Phase ->Link Binary With Libraries()下添加 MobileCoreServices.framework。添加成功后运行程序成功。

时间: 2024-08-19 04:10:26

AFNetworking报错"_UTTypeCopyPreferredTagWithClass", referenced from: _AFContentTypeForPathExtens的相关文章

AFNetworking报错:(415 Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unsupported media type (415)")

问题? 今天在与后台调接口的时候,遇到一个问题,使用AFNetworking报错,具体如下: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: unsupported media type (415)" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse:

cocoapods导入afnetworking报错问题

使用cocoapods导入afnetworking报错,原因是当前xcode的版本低使用了最新版本的afnetworking,就会出现如下错误,这时候只只要使用终端,更新使用低版本的afnetwork ing即可. 如果是其他情况下导致出现了APPLE   LLVM  6.0 Error 错误,可以尝试去资源库--Developer--xcode--DerivedData文件夾,删除 DerivedData文件夹下的内容(如DerivedData文件夹下无重要文件).如无法全部删除,则删除 De

AspectJ报错:error at ::0 can&#39;t find referenced pointcut XXX

今天在使用AspectJ进行注解切面时,遇到了一个错误. 切点表达式就是无法识别——详细报错信息如下: Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xingoo' defined in class path resource [bean.xml]: Initialization of bean fail

springAOP注解方式定义切入点报错error at ::0 can&#39;t find referenced pointcut

[说明] 1.使用spring版本:4.0.4 2.springAOP相关依赖包: 1)aopalliance-1.0.jar 2)aspectjweaver-1.8.9.jar 3)aspectjrt-1.8.9.jar 3.分析: 1)当切面类的方法上通知注解直接输入切入点表达式时,没有报错.切面类代码如下: import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.Aspect

全局变量报错:UnboundLocalError: local variable &#39;l&#39; referenced before assignment

总结: 内部函数,不修改全局变量可以访问全局变量 内部函数,修改同名全局变量,则python会认为它是一个局部变量 在内部函数修改同名全局变量之前调用变量名称(如print sum),则引发Unbound-LocalError 在程序中设置的sum属于全局变量,而在函数中没有sum的定义,根据python访问局部变量和全局变量的规则:当搜索一个变量的时候,python先从局部作用域开始搜索,如果在局部作用域没有找到那个变量,那样python就在全局变量中找这个变量,如果找不到抛出异常(NAMEE

【转】Eclipse下启动tomcat报错:/bin/bootstrap.jar which is referenced by the classpath, does not exist.

转载地址:http://blog.csdn.net/jnqqls/article/details/8946964 1.错误: 在Eclipse下启动tomcat的时候,报错为:Eclipse下启动tomcat报错:The archive: C:/Program Files(x86)/Java/jdk1.7.0_10/lib/tools.jar which is referenced by the classpath, doesnot exist. 2.原因: 这是因为我中途移动过tomcat的位

全局变量报错:UnboundLocalError: local variable &#39;xxxxx&#39; referenced before assignment

daibuchong 参考:http://blog.csdn.net/my2010sam/article/details/17735159 http://blog.csdn.net/onlyanyz/article/details/45009697 http://blog.csdn.net/magictong/article/details/4464024 全局变量报错:UnboundLocalError: local variable 'xxxxx' referenced before ass

Spring,SpringMVC,Mybatis等配置文件报错解决(Referenced file contains errors)

今天自己搭建了ssm框架,头文件什么的都是拷贝的笔记的,本来不会出错.可是偏偏报错(如下): Referenced file contains errors (http://www.ibatis.com/dtd/sql-map-config-2.dtd). For more information, right click on the message in the  Problems View and select "Show Details..." 整整折腾了一上午,也没解决.网上

【Spring实战】—— 12 AspectJ报错:error at ::0 can&#39;t find referenced pointcut XXX

今天在使用AspectJ进行注解切面时,遇到了一个错误. 切点表达式就是无法识别——详细报错信息如下: Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xingoo' defined in class path resource [bean.xml]: Initialization of bean fail