在ios中经常会遇到:ARC forbids explicit message send of 'autorelease' 或“ARC forbids explicit message send of release”这样的错误。原因可能是项目使用了arc机制而有些文件禁止使用而报错,

解决方法:

1.禁用在Xcode中的特定文件的ARC

点击项目名,在中间一栏选择targets,然后选择build phases选项。

展开Compile Sources,找到你报错的文件名,然后双击添加-fno-objc-arc:如下图:

方法二:把整个项目改成非arc机制的:

在build Settings中:把Objective-C Automatic Reference Co....设为NO:

转载请注明:

新浪微博:http://weibo.com/u/3202802157

ios开发之路十一(ARC forbids explicit message send of 'autorelease'错误)的更多相关文章

  1. ARC forbids explicit message send of 'autorelease'错误

    (ARC forbids explicit message send of 'autorelease'错误) 在ios中经常会遇到:ARC forbids explicit message send ...

  2. OC中ARC forbids explicit message send of release错误(转)

    ARC forbids explicit message send of'release' 很显然,是ARC的问题. 错误原因:在创建工程的时候点选了“Use Automatic Reference ...

  3. OC中ARC forbids explicit message send of release错误

    在ios编程中,如果成员变量为对象,我们需要对成员变量内存管理,否则,会造成内存泄露.即我们要对成员变量进行手动的内存释放. 很显然,是ARC的问题. 错误原因:在创建工程的时候点选了“Use Aut ...

  4. Object-C中ARC forbids explicit message send of ' ' 错误

    OC中ARC forbids explicit message send of '...'错误 转自CSDN hahahacff 有所整理 ARC forbids explicit message s ...

  5. libXml ARC forbids explicit message send of'release'

    'release' is unavailable: not available in automatic reference counting mode ARC forbids explicit me ...

  6. ARC forbids explicit message send of'retain'解决办法

    项目中导入一些开源的类库,里面会爆出一些ARC forbids explicit message send of'retain' 这种问题 解决方法: 点击项目Target -> 找到" ...

  7. ARC forbids explicit message send of release

    http://blog.sina.com.cn/s/blog_7b9d64af01019rqt.html

  8. Object C学习笔记5-ARC forbids explicit message* 编译错误

    在学习Object C的过程中XCode 编译器经常出现 "ARC forbids explicit message send of release" 的错误提示. 以上问题主要出 ...

  9. iOS开发拓展篇—xib中关于拖拽手势的潜在错误

    iOS开发拓展篇—xib中关于拖拽手势的潜在错误 一.错误说明 自定义一个用来封装工具条的类 搭建xib,并添加一个拖拽的手势. 主控制器的代码:加载工具条 封装工具条以及手势拖拽的监听事件 此时运行 ...

随机推荐

  1. jquery密码强度检测

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. Android &quot;QR二维码扫描&quot;

    支持灯 扫描结果 支持 抄.分享.浏览打开(超链接) 自己主动保存扫描记录 划删除 和源代码 git: http://git.oschina.net/892642257/QRCode csdn(0分) ...

  3. struts2基本介绍

    前言 文本 Struts2 Apache SoftWare Foundation Tomcat/Struts1/Struts2/Ibaitas/ MVC框架:Struts1/Struts2/JSF/W ...

  4. Content-Type boundary 问题

    我并不知道问题怎么描述清楚一些. 事情是这样的,使用  Microsoft Dynamics CRM Server 2016 做CRM系统的时候用到 使用 Web API 执行批处理操作(参见SDK或 ...

  5. js checkbox多选值采集

    var objs = document.getElementsByTagName("input"); for (var i = 0; i < objs.length; i++ ...

  6. leetcode -day31 Subsets I II

    1.  Subsets Given a set of distinct integers, S, return all possible subsets. Note: Elements in a ...

  7. Linux C语言操作MySQL

    原文:Linux C语言操作MySQL 1.MySQL数据库简介 MySQL是一个开源码的小型关系数据库管理系统,体积小,速度快,总体成本低,开源.MySQL有以下特性: (1) 使用C和C++编写, ...

  8. Jquery.validate表单验证

    一.用前必备官方网站:http://bassistance.de/jquery-plugins/jquery-plugin-validation/API: http://jquery.bassista ...

  9. 使用TeamCity对项目进行可持续集成管理

    使用TeamCity对项目进行可持续集成管理 一.可持续集成管理   持续集成,CI:即Continuous integration. 可持续集成的概念是基于团队(小组)协作开发而提出来的,为了提高团 ...

  10. vim的复制粘贴小结

    vim帮助文档里与粘贴板有关的内容如下: vim有12个粘贴板,分别是0.1.2.….9.a.“.+:用:reg命令可以查看各个粘贴板里的内容.在vim中简单用y只是复制到“(双引号)粘贴板里,同样用 ...