当我尝试加载 AdMob 广告时,我的应用 iPad 应用崩溃了,这是我的代码:
//Google AdMob
bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0,
self.view.frame.size.height -
GAD_SIZE_728x90.height -40,
GAD_SIZE_728x90.width,
GAD_SIZE_728x90.height)];
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = @"XXXXXXXXXXXXXX";
// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:[GADRequest request]];
[bannerView_ release];
日志是:
2013-07-27 13:44:37.145 XXXX[4057:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0x1e011f30'
*** First throw call stack:
(0x312122a3 0x390bd97f 0x31215e07 0x31214531 0x3116bf68 0x10d624 0x10f700 0x10caa0 0xea9b7 0x33039595 0x330c5353 0x33106d11 0x33105fe7 0x332283ef 0x331050c5 0x33105077 0x33105055 0x3310490b 0x33104e01 0x3302d5f1 0x3301a801 0x3301a11b 0x34d255a3 0x311e7683 0x311e6ee9 0x311e5cb7 0x31158ebd 0x31158d49 0x34d242eb 0x3306e301 0xbe065 0x394f4b20)
libc++abi.dylib: terminate called throwing an exception
(lldb)
这里有什么问题?