1. NSAutoreleasePool' is unavailable: not available in automatic reference counting mode 

X-code 4.2,苹果引入了自动记算引用数的功能,所以老的项目中

NSAutoreleasePool  * pool = [[NSAutoreleasePool allocinit];是报错的,必须把arc(auto-reference-command)关闭才行,方法如下:

Build settings--->Apple LLVM compiler 3.0- Language--->Objective-C Automatic Reference Counting 将YES改为NO。

如果是ios5 需要在main的头部引入 #import "AppDelegate.h" 才可以解决。

相关文章:

  • 2022-03-10
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-12-24
  • 2021-10-16
猜你喜欢
  • 2022-02-27
  • 2022-12-23
  • 2021-10-07
  • 2021-11-25
  • 2021-08-18
  • 2021-11-15
  • 2022-01-16
相关资源
相似解决方案