其他分享
首页 > 其他分享> > android – Facebook Audience SDK导致CRASH

android – Facebook Audience SDK导致CRASH

作者:互联网

我最近将我的应用程序的facebook观众sdk更新为最新版本,并且因为onLoggingImpression而导致崩溃,这是AdListener中的一种新方法,下面是我得到的堆栈跟踪.我在这里使用自定义admob facebook适配器.

*

java.lang.AbstractMethodError: abstract method "void com.facebook.ads.AdListener.onLoggingImpression(com.facebook.ads.Ad)"
                                                                           at com.facebook.ads.InterstitialAd$1.b(Unknown Source)   
                                                                           at com.facebook.ads.internal.DisplayAdController$11.onInterstitialLoggingImpression(Unknown Source)
                                                                           at com.facebook.ads.internal.adapters.s.onReceive(Unknown Source)
                                                                           at android.support.v4.b.g.a(LocalBroadcastManager.java:297)
                                                                           at android.support.v4.b.g.a(LocalBroadcastManager.java:46)
                                                                           at android.support.v4.b.g$1.handleMessage(LocalBroadcastManager.java:116)
                                                                           at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                           at android.os.Looper.loop(Looper.java:154)
                                                                           at android.app.ActivityThread.main(ActivityThread.java:6123)
                                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

*

解决方法:

感谢@Adomas,问题应该是Facebook适配器.

这是最新的集成指南.
https://developers.google.com/admob/android/mediation/facebook

现在我们不需要手动下载适配器.

compile 'com.facebook.android:audience-network-sdk:4.25.0'
compile 'com.google.ads.mediation:facebook:4.25.0.0'

但我使用4.23.0,因为4.25.0在我构建项目后显示了一些警告.

标签:android,admob,facebook-ads-api
来源: https://codeday.me/bug/20190823/1699186.html