Objective c AdMob使iPhone应用程序xcode崩溃
因为iAd在全世界都不起作用,我决定试用AdMob 问题是,当我启动应用程序时,没有错误,但当我按下play game时 整个应用程序崩溃了 错误-> [GadbanerView private]:发送到实例0x9159e50 2012-07-30 09:14:12.676应用程序[1323:c07]的无法识别的选择器*正在终止应用程序 由于未捕获的异常“NSInvalidArgumentException”,原因: '-[GadbanerView private]:发送到实例的选择器无法识别 0x9159e50' 代码-> h m 断点->Objective c AdMob使iPhone应用程序xcode崩溃,objective-c,xcode,compiler-errors,admob,Objective C,Xcode,Compiler Errors,Admob,因为iAd在全世界都不起作用,我决定试用AdMob 问题是,当我启动应用程序时,没有错误,但当我按下play game时 整个应用程序崩溃了 错误-> [GadbanerView private]:发送到实例0x9159e50 2012-07-30 09:14:12.676应用程序[1323:c07]的无法识别的选择器*正在终止应用程序 由于未捕获的异常“NSInvalidArgumentException”,原因: '-[GadbanerView private]:发送到实例的选择器无法识别
app`-[GADBannerView adSize] at GADBannerView.m:100:
0x1f5c2: pushl %ebp
0x1f5c3: movl %esp, %ebp
0x1f5c5: pushl %esi
0x1f5c6: subl $20, %esp
0x1f5c9: calll 0x1f5ce ; -[GADBannerView adSize] + 12 at GADBannerView.m:101
0x1f5ce: popl %esi
0x1f5cf: movl 217414(%esi), %eax
0x1f5d5: movl %eax, 4(%esp)
0x1f5d9: movl 12(%ebp), %eax
0x1f5dc: movl %eax, (%esp)
0x1f5df: calll 0x32022 ; symbol stub for: objc_msgSend
0x1f5e4: movl 217442(%esi), %ecx
0x1f5ea: movl %ecx, 4(%esp)
0x1f5ee: movl %eax, (%esp)
0x1f5f1: calll 0x32022 ; symbol stub for: objc_msgSend
0x1f5f6: movl 8(%ebp), %ecx
0x1f5f9: testl %eax, %eax
0x1f5fb: je 0x1f618 ; -[GADBannerView adSize] + 86 at GADBannerView.m:101
0x1f5fd: movl 217402(%esi), %edx
0x1f603: movl %edx, 8(%esp)
0x1f607: movl %eax, 4(%esp)
0x1f60b: movl %ecx, (%esp)
0x1f60e: calll 0x32034 ; symbol stub for: objc_msgSend_stret
0x1f613: addl $16, %esp
0x1f616: jmp 0x1f62f ; -[GADBannerView adSize] + 109 at GADBannerView.m:101
0x1f618: movl $0, 4(%ecx)
0x1f61f: movl $0, (%ecx)
0x1f625: movl $0, 8(%ecx)
0x1f62c: addl $20, %esp
0x1f62f: popl %esi
0x1f630: popl %ebp
0x1f631: ret $4
异常在
0x1f5e4:movl 217442(%esi),%ecx
我也遇到了这个问题。我使用了-all\u load
链接器标志
这是你需要的链接
发布的代码没有明显的错误。在未重新协商的选择器上设置一个断点(请参见此),并在调试器到达断点后发布完整的堆栈跟踪。投票后,您保护了我的生命:DDo您的意思是它必须删除
所有加载
?我已经删除了它,但仍然存在问题,您需要添加-all\u load
链接器标志。
_AbMob =[[GADBannerView alloc]initWithFrame:CGRectMake(0.0,self.view.frame.size.height-195, 320, 50)];
_AbMob.adUnitID = @"myNumber";
_AbMob.rootViewController = self;
[self.view addSubview:_AbMob];
GADRequest *r = [[GADRequest alloc] init];
r.testing = YES;
app`-[GADBannerView adSize] at GADBannerView.m:100:
0x1f5c2: pushl %ebp
0x1f5c3: movl %esp, %ebp
0x1f5c5: pushl %esi
0x1f5c6: subl $20, %esp
0x1f5c9: calll 0x1f5ce ; -[GADBannerView adSize] + 12 at GADBannerView.m:101
0x1f5ce: popl %esi
0x1f5cf: movl 217414(%esi), %eax
0x1f5d5: movl %eax, 4(%esp)
0x1f5d9: movl 12(%ebp), %eax
0x1f5dc: movl %eax, (%esp)
0x1f5df: calll 0x32022 ; symbol stub for: objc_msgSend
0x1f5e4: movl 217442(%esi), %ecx
0x1f5ea: movl %ecx, 4(%esp)
0x1f5ee: movl %eax, (%esp)
0x1f5f1: calll 0x32022 ; symbol stub for: objc_msgSend
0x1f5f6: movl 8(%ebp), %ecx
0x1f5f9: testl %eax, %eax
0x1f5fb: je 0x1f618 ; -[GADBannerView adSize] + 86 at GADBannerView.m:101
0x1f5fd: movl 217402(%esi), %edx
0x1f603: movl %edx, 8(%esp)
0x1f607: movl %eax, 4(%esp)
0x1f60b: movl %ecx, (%esp)
0x1f60e: calll 0x32034 ; symbol stub for: objc_msgSend_stret
0x1f613: addl $16, %esp
0x1f616: jmp 0x1f62f ; -[GADBannerView adSize] + 109 at GADBannerView.m:101
0x1f618: movl $0, 4(%ecx)
0x1f61f: movl $0, (%ecx)
0x1f625: movl $0, 8(%ecx)
0x1f62c: addl $20, %esp
0x1f62f: popl %esi
0x1f630: popl %ebp
0x1f631: ret $4