[英]WP7 AdMob SDK doesn't Work
I always get an error when I start an app with an AdMob BannerAd.当我使用 AdMob BannerAd 启动应用程序时,我总是遇到错误。 I just added the control to the toolbox and copy pasted in in the form.
我只是将控件添加到工具箱并复制粘贴到表单中。
Here is the relevant code:以下是相关代码:
<my:BannerAd HorizontalAlignment="Left" Margin="0,522,0,0" Name="bannerAd1" VerticalAlignment="Top" />
When I run the app I get this error:当我运行该应用程序时,我收到此错误:
System.NullReferenceException wurde nicht behandelt.
Message=NullReferenceException
StackTrace:
bei Google.AdMob.Ads.WindowsPhone7.WPF.DisplayAdBase.<>c__DisplayClass3c.<LoadDisplay>b__38()
bei System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
bei System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei System.Delegate.DynamicInvokeOne(Object[] args)
bei System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
bei System.Delegate.DynamicInvoke(Object[] args)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
bei System.Windows.Threading.Dispatcher.OnInvoke(Object context)
bei System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
bei System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
bei System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
Im using http://wp7adrotator.codeplex.com/ .我正在使用http://wp7adrotator.codeplex.com/ 。 Having no problems still on my app.
我的应用程序仍然没有问题。 http://www.aldarit.com/superads.html is a good solution too.
http://www.aldarit.com/superads.html也是一个很好的解决方案。 Used it before started using wp7adrotator.
在开始使用 wp7adrotator 之前使用它。 You might give it a try too.
你也可以试一试。
Hope it helps.希望能帮助到你。
I'm using AldarIT SuperAds for three production Apps with AdMob as primary ad provider.我正在将AldarIT SuperAds用于三个生产应用程序,其中 AdMob 作为主要广告提供商。 No problems so far after 5 Months.
5个月后到目前为止没有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.