报错原因是 项目使用的是ARC,但是有非ARC代码。 项目中要混合使用ARC和非ARC。

解决:

  1. target -> Build Phases -> Compile Sources
  2. 双击报错的 *.m 文件
  3. 在窗口中输入-fno-objc-arc

  如果使用的非 ARC ,则为 ARC 的代码加入 -fobjc-arc

  如果使用的是 ARC ,则为非 ARC 代码加入 -fno-objc-arc

判断项目是否用的ARC:

error: 'retain' is unavailable: not available in automatic reference counting. 解决办法的更多相关文章

  1. error: 'release' is unavailable: not available in automatic reference counting,该怎么解决

    编译出现错误: 'release' is unavailable: not available in automatic reference counting mode.. 解决办法: You nee ...

  2. [转]error: 'retainCount' is unavailable: not available in automatic reference counting mode

    转载地址:http://choijing.iteye.com/blog/1860761   后来发现是编译选项的问题:   1.点击工程名 打开编译选项 2.在编译选项中,选择Bulid Settin ...

  3. [转]关于NSAutoreleasePool' is unavailable: not available in automatic reference counting mode的解决方法

    转载地址:http://blog.csdn.net/xbl1986/article/details/7216668 Xcode是Version 4.2 Build 4D151a 根据Objective ...

  4. 错误解决:release' is unavailable: not available in automatic reference counting mode

    解决办法: You need to turn off Automatic Reference Counting. You do this by clicking on your project in ...

  5. not available in automatic reference counting mode

    UncaughtExceptionHandler.m:156:47: 'autorelease' is unavailable: not available in automatic referenc ...

  6. ARC(Automatic Reference Counting )技术概述

    此文章由Tom翻译,首发于csdn的blog 转自:http://blog.csdn.net/nicktang/article/details/6792972 Automatic Reference ...

  7. xcode禁用ARC(Automatic Reference Counting)

    Automatic Reference Counting,自动引用计数,即ARC,可以说是WWDC2011和iOS5所引入的最大的变革和最激动人心的变化.ARC是新的LLVM 3.0编译器的一项特性, ...

  8. JSONKit does not support Objective-C Automatic Reference Counting(ARC) / ARC forbids Objective-C objects in struct

    当我们在使用JSONKit处理数据时,直接将文件拉进项目往往会报这两个错“JSONKit   does not support Objective-C Automatic Reference Coun ...

  9. iOS开发 JSonKit does not support Objective-C Automatic Reference Counting(ARC)

    有使用JSonKit的朋友,如果遇到“JSonKit does not support Objective-C Automatic Reference Counting(ARC)”这种情况,可参照如下 ...

随机推荐

  1. POJ 2663 Tri Tiling 【状压DP】

    Description In how many ways can you tile a 3xn rectangle with 2x1 dominoes?  Here is a sample tilin ...

  2. week1总结

    week1总结 1. 开发上线工具流程以及规范类 规范: css注释:/* Comment Text*/ Css嵌套选择器:请不要让嵌套选择器的深度超过 3 层! 再说一遍: 永远不要嵌套 ID 选择 ...

  3. Vue-admin工作整理(九): 状态管理Vuex-state和getters

    前提:通过项目结构个人设置创建的项目 store文件下actions.js.mutations.js.state.js都是根级别的状态管理,引用入口是通过index.js来实现,整个Vuex处理逻辑为 ...

  4. P2678 跳石头

    传送门 思路: 二分跳跃的最短距离 mid .暴力判断如果有两个石头直接的距离小于 mid ,就把这个石头拿走.如果拿走的石头数目 cnt ≤ m,说明二分的答案可行,ans = mid,接着二分更短 ...

  5. ExtJs常用功能

    1.判断内容是否修改 1) var cgrid = query_panel.cgrid; var v = cgrid.getValues(); //console.log(v); if (v != & ...

  6. 分布式消息通信Kafka-原理分析

    本文目标 TopicPartition 消息分发策略 消息消费原理 消息的存储策略 Partition 副本机制 1 关于 Topic 和 Partition 1.1 Topic 在 kafka 中, ...

  7. Java ----> java io / java nio / java net 学习资源汇总

    Java IO教程 Java NIO 系列教程 Java网络教程 学习Java基础的一个英文网站:http://tutorials.jenkov.com/ ,上面中文教程来自并发编程网,上面中文教程翻 ...

  8. 记一次oracle数据库复制过程

    记录一次自己数据库复制的过程(从公司测试环境复制到客户测试环境),主要是每次自己都会忘记,不如记录一下,方便自己以后找,因此,本篇内容不会很详细,主要是用于给我自己提醒,相对于一种记笔记的效果. cm ...

  9. LCSS最长公共子序列算法

    0.论文基本介绍以及相关内容 分析移动用户位置的相似性,提取移动用户的相似路径在出行路径预测.兴趣区域发现.轨迹聚类.个性化路径推荐等领域具有广泛的应用. 重点:利用移动用户定位数据找到合适轨迹的表示 ...

  10. Django的认证系统和Django admin的简单使用

    Django自带的用户认证 我们在开发一个网站的时候,无可避免的需要设计实现网站的用户系统.此时我们需要实现包括用户注册.用户登录.用户认证.注销.修改密码等功能,这还真是个麻烦的事情呢. Djang ...