在 iOS5 模拟器中运行时收到此错误:
由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:' * - [__NSPlaceholderDictionary initWithObjects:forKeys:count:]:尝试从对象[3]中插入零对象'*第一次抛出调用堆栈:(0x1497052 0x1286d0a 0x13d680b 0x13eee39 0xf92d 0x3f49d6 036 0x404743 0x4051f8 0x3f8aa9 0x1d5efa9 0x146b1c5 0x13d0022 0x13ce90a 0x13cddb4 0x13cdccb 0x3f52a7 0x3f6a9b 0xf15d 0x2405)终止调用抛出异常(lldb)
它在启动时崩溃。:@
我一直在使用断点,我认为(不确定)这可能与这一行有关:
@property (nonatomic, retain) CLLocationManager *locationManager;
完整的应用委托:
#import <UIKit/UIKit.h>
#import "ECSlidingViewController.h"
#import <CoreLocation/CoreLocation.h>
#import "Reachability.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, CLLocationManagerDelegate> {
Reachability* internetReach;
}
@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, retain) CLLocation *currentLoc;
@end
谢谢,非常感谢帮助!