当前位置: 首页 > 知识库问答 >
问题:

受众网络不使用Admob中介

阚允晨
2023-03-14

我最近开始在Unity进行Admob调解工作。使用Admob指南,我已经成功地做了一些广告网络,但现在偶然发现观众网络由于某种原因不能工作,我检查了以下Logcat:

04-25 12:27:41.444: I/Ads(24246): Trying mediation network: https://googleads.g.doubleclick.net/aclk?sa=L&ai=CktAubWHBXJCyJsLKxgK8iJa4D_nJ2qYF0e-FupIBABAIIPaf5WNgy9y0BakCAAAAAICELkGoAwGqBCpP0JYVqjXRsTejJKRPkKjp4qtE5jVAPiRaFF77IXqeLsWUzY__-Pd2elqQBgHABguAB4H4qTCYBwGoB9nLG6gHz8wb0ggHCIABEAEYDg&num=1&cid=CAASBORoPe4&sig=AOD64_1JupFPNn7lFJJqOokofvlT0lFnhw&adurl=http://example.com
04-25 12:27:41.445: I/Ads(24246): Instantiating mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter
04-25 12:27:41.447: I/zygote(24246): Rejecting re-init on previously-failed class java.lang.Class<com.google.ads.mediation.facebook.FacebookMediationAdapter>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/mediation/Adapter;
04-25 12:27:41.447: I/zygote(24246):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
04-25 12:27:41.447: I/zygote(24246):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
04-25 12:27:41.447: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzau(java.lang.String) ((null):-1)
04-25 12:27:41.447: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzas(java.lang.String) ((null):-1)
04-25 12:27:41.447: I/zygote(24246):   at boolean com.google.android.gms.internal.zzka$zza.onTransact(int, android.os.Parcel, android.os.Parcel, int) ((null):-1)
04-25 12:27:41.447: I/zygote(24246):   at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:622)
04-25 12:27:41.447: I/zygote(24246):   at android.os.Parcel ox.a(int, android.os.Parcel) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
04-25 12:27:41.447: I/zygote(24246):   at com.google.android.gms.ads.internal.mediation.client.e com.google.android.gms.ads.internal.mediation.client.d.a(java.lang.String) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.447: I/zygote(24246):   at void com.google.android.gms.ads.internal.mediation.g.run() (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:6)
04-25 12:27:41.447: I/zygote(24246):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:789)
04-25 12:27:41.447: I/zygote(24246):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:98)
04-25 12:27:41.447: I/zygote(24246):   at void aai.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.447: I/zygote(24246):   at void com.google.android.gms.ads.internal.util.e.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.447: I/zygote(24246):   at void aai.dispatchMessage(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.448: I/zygote(24246):   at void android.os.Looper.loop() (Looper.java:164)
04-25 12:27:41.448: I/zygote(24246):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6798)
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
04-25 12:27:41.448: I/zygote(24246):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
04-25 12:27:41.448: I/zygote(24246):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)
04-25 12:27:41.448: I/zygote(24246): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.mediation.Adapter" on path: DexPathList[[zip file "/data/app/com.test.admob.mediation.to-ol90HvQyH2v8rU4_iVV7qA==/base.apk"],nativeLibraryDirectories=[/data/app/com.test.admob.mediation.to-ol90HvQyH2v8rU4_iVV7qA==/lib/arm, /data/app/com.test.admob.mediation.to-ol90HvQyH2v8rU4_iVV7qA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93)
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
04-25 12:27:41.448: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzau(java.lang.String) ((null):-1)
04-25 12:27:41.448: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzas(java.lang.String) ((null):-1)
04-25 12:27:41.448: I/zygote(24246):   at boolean com.google.android.gms.internal.zzka$zza.onTransact(int, android.os.Parcel, android.os.Parcel, int) ((null):-1)
04-25 12:27:41.448: I/zygote(24246):   at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:622)
04-25 12:27:41.448: I/zygote(24246):   at android.os.Parcel ox.a(int, android.os.Parcel) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
04-25 12:27:41.448: I/zygote(24246):   at com.google.android.gms.ads.internal.mediation.client.e com.google.android.gms.ads.internal.mediation.client.d.a(java.lang.String) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.448: I/zygote(24246):   at void com.google.android.gms.ads.internal.mediation.g.run() (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:6)
04-25 12:27:41.448: I/zygote(24246):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:789)
04-25 12:27:41.448: I/zygote(24246):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:98)
04-25 12:27:41.448: I/zygote(24246):   at void aai.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.448: I/zygote(24246):   at void com.google.android.gms.ads.internal.util.e.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.448: I/zygote(24246):   at void aai.dispatchMessage(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.448: I/zygote(24246):   at void android.os.Looper.loop() (Looper.java:164)
04-25 12:27:41.448: I/zygote(24246):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6798)
04-25 12:27:41.448: I/zygote(24246):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
04-25 12:27:41.448: I/zygote(24246):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
04-25 12:27:41.448: I/zygote(24246):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)
04-25 12:27:41.449: I/zygote(24246): Rejecting re-init on previously-failed class java.lang.Class<com.google.ads.mediation.facebook.FacebookAdapter>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
04-25 12:27:41.449: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzau(java.lang.String) ((null):-1)
04-25 12:27:41.449: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzas(java.lang.String) ((null):-1)
04-25 12:27:41.449: I/zygote(24246):   at boolean com.google.android.gms.internal.zzka$zza.onTransact(int, android.os.Parcel, android.os.Parcel, int) ((null):-1)
04-25 12:27:41.449: I/zygote(24246):   at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:622)
04-25 12:27:41.449: I/zygote(24246):   at android.os.Parcel ox.a(int, android.os.Parcel) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
04-25 12:27:41.449: I/zygote(24246):   at com.google.android.gms.ads.internal.mediation.client.e com.google.android.gms.ads.internal.mediation.client.d.a(java.lang.String) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.449: I/zygote(24246):   at void com.google.android.gms.ads.internal.mediation.g.run() (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:6)
04-25 12:27:41.449: I/zygote(24246):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:789)
04-25 12:27:41.449: I/zygote(24246):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:98)
04-25 12:27:41.449: I/zygote(24246):   at void aai.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.449: I/zygote(24246):   at void com.google.android.gms.ads.internal.util.e.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.449: I/zygote(24246):   at void aai.dispatchMessage(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.449: I/zygote(24246):   at void android.os.Looper.loop() (Looper.java:164)
04-25 12:27:41.449: I/zygote(24246):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6798)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
04-25 12:27:41.449: I/zygote(24246):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
04-25 12:27:41.449: I/zygote(24246):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)
04-25 12:27:41.449: I/zygote(24246): Caused by: java.lang.ClassNotFoundException: com.google.ads.mediation.facebook.FacebookMediationAdapter
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String) (VMClassLoader.java:-2)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) (ClassLoader.java:738)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:363)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
04-25 12:27:41.449: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzau(java.lang.String) ((null):-1)
04-25 12:27:41.449: I/zygote(24246):   at com.google.android.gms.internal.zzkb com.google.android.gms.internal.zzjz.zzas(java.lang.String) ((null):-1)
04-25 12:27:41.449: I/zygote(24246):   at boolean com.google.android.gms.internal.zzka$zza.onTransact(int, android.os.Parcel, android.os.Parcel, int) ((null):-1)
04-25 12:27:41.449: I/zygote(24246):   at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:622)
04-25 12:27:41.449: I/zygote(24246):   at android.os.Parcel ox.a(int, android.os.Parcel) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
04-25 12:27:41.449: I/zygote(24246):   at com.google.android.gms.ads.internal.mediation.client.e com.google.android.gms.ads.internal.mediation.client.d.a(java.lang.String) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.449: I/zygote(24246):   at void com.google.android.gms.ads.internal.mediation.g.run() (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:6)
04-25 12:27:41.449: I/zygote(24246):   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:789)
04-25 12:27:41.449: I/zygote(24246):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:98)
04-25 12:27:41.449: I/zygote(24246):   at void aai.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.449: I/zygote(24246):   at void com.google.android.gms.ads.internal.util.e.a(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
04-25 12:27:41.449: I/zygote(24246):   at void aai.dispatchMessage(android.os.Message) (:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:-1)
04-25 12:27:41.449: I/zygote(24246):   at void android.os.Looper.loop() (Looper.java:164)
04-25 12:27:41.449: I/zygote(24246):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6798)
04-25 12:27:41.449: I/zygote(24246):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
04-25 12:27:41.449: I/zygote(24246):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240)
04-25 12:27:41.449: I/zygote(24246):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)
04-25 12:27:41.450: I/Ads(24246): Trying mediation network: https://googleads.g.doubleclick.net/aclk?sa=L&ai=Cl_QQbWHBXJCyJsLKxgK8iJa4D_nJ2qYF0e-FupIBABAIIPaf5WNgy9y0BakCAAAAAICELkGoAwGqBCpP0JYVqjXRsTejJKRPkKjp4qtE5jVAPiQVMm_0IRvtMMWUkrPG0sY8WVmQBgHABguAB4H4qTCYBwGoB9nLG6gHz8wb0ggHCIABEAEYDg&num=1&cid=CAASBORoPe4&sig=AOD64_2uPRs5nS_rhuIF-J_uAnHVfY4hYg&adurl=http://example.com
04-25 12:27:41.450: I/Ads(24246): Instantiating mediation adapter: com.google.ads.mediation.chartboost.ChartboostAdapter

正如您所看到的,当调用开始为受众网络适配器实例化时,一些合子的东西开始抛出这些奇怪的日志,并且抛出ClassNotFoundException它没有找到google gms中介适配器类。此外,它忽略了这一点并继续,然后显示了FacebookMediationAdapter的另一个ClassNotFOundException。奇怪的是,LogCat中的所有日志都是绿色的,不是红色的表示错误,也不是黄色的表示警告,而是绿色的日志。但我忽略了这一点,开始明白为什么会这样。我使用JD-GUI打开了受众网络适配器aar文件,并在那里找到了相关的FacebookMediationAdapter类。

然后我打开了play服务和ads库的aar文件,它也有了相关的gms中介类。这些类中引用的函数在这些类中也有更多。

我想到的一个问题是,当我能清楚地看到统一的时候,为什么没有找到类。其次,这些文件是否与apk包一起使用??

共有1个答案

凤经国
2023-03-14

信不信由你,我用一个错误解决了这个问题,这是因为一件奇怪的事情,它是这样的:

我最后一次做中介是MoPub,其中的步骤是导入MoPub sdk,相关的adnetwork sdk和相关的MoPub适配器文件,在这种情况下,信不信由你,我只需要导入Admob Unity sdk和相关的adnetwork适配器,根本不需要Adnetwrok sdk来显示广告!!!

是的,你没听错,这是真的,广告显示没有相关的Unity SDK,我做错了,我在另一个SDK上工作,我忘了导入SDK,构建成功了,打开了文件,加载了广告,瞧,它显示出来了。在指南中没有提到这一点,它明确表示要导入所有的SDK。

 类似资料:
  • 我们目前正在我们的iOS应用程序上使用带有AdMob中介的脸书受众网络。我们正在使用CocoaPods的最新版本的FAN(5.2.0)和谷歌广告(7.41.0)。实施完全按照这里的留档完成-https://developers.google.com/admob/ios/mediation/facebook并使用这里的工具测试了实施-https://developers.facebook.com/d

  • 我是新来的广告调解。我有一个flutter应用程序,我已经使用以下admob_flutter插件集成了admob,它在Android和iOS上运行良好。 https://pub.dev/packages/admob_flutter 现在我想添加facebook受众作为中介网络。我按照google提供的以下教程中的步骤在Admob portal中设置观众帐户和集成。 https://develope

  • 最近,我在iOS应用程序的AdMob中介设置中添加了Facebook观众网络。我已确认Admob适配器正在设备上正确初始化风扇适配器 关于第二排我得到的0印象有什么想法吗

  • 如果中介网络之一不提供广告服务,是否可以使用其他广告网络? 类似于:

  • 我已经在我的android应用中实现了facebook受众网络横幅广告。我想在用户点击它并返回到应用程序后15秒不播放广告。我已经搜索了很多,没有找到任何解决方案,我这样做是为了防止非法点击。我怎么能这么做?

  • Docker 允许通过外部访问容器或容器互联的方式来提供网络服务。