admob广告未能加载:3

时间:2018-11-29 15:09:47

标签: android admob ads

我正在开发一个android应用程序,我想在我的应用程序中显示横幅广告。我以前的应用程序可以正常运行,并且广告会显示。创建新应用时,即使在旧应用中,广告也没有展示

它显示广告无法加载广告:3

这在logcat中显示

11-29 18:52:54.831: D/ViewRootImpl(31298): ViewPostImeInputStage processPointer 0
11-29 18:52:54.921: D/ViewRootImpl(31298): ViewPostImeInputStage processPointer 1
11-29 18:52:54.921: I/Timeline(31298): Timeline: Activity_launch_request id:apps.s.r.sh time:126574535
11-29 18:52:54.951: W/ResourcesManager(31298): getTopLevelResources: /data/app/apps.s.r.sh-1/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:54.951: W/ResourcesManager(31298): getTopLevelResources: /data/app/apps.s.r.sh-1/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:55.241: D/SecWifiDisplayUtil(31298): Metadata value : none
11-29 18:52:55.251: D/ViewRootImpl(31298): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{b1e1489 I.E...... R.....ID 0,0-0,0}
11-29 18:52:55.571: W/DisplayListCanvas(31298): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
11-29 18:52:55.591: D/ViewRootImpl(31298): MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
11-29 18:52:55.851: I/Timeline(31298): Timeline: Activity_idle id: android.os.BinderProxy@1308390 time:126575466
11-29 18:52:55.861: V/ActivityThread(31298): updateVisibility : ActivityRecord{c3eecaf token=android.os.BinderProxy@2057663 {apps.s.r.sh/apps.s.r.sh.MainActivity}} show : false
11-29 18:52:56.921: D/ViewRootImpl(31298): ViewPostImeInputStage processPointer 0
11-29 18:52:56.991: D/ViewRootImpl(31298): ViewPostImeInputStage processPointer 1
11-29 18:52:57.001: I/Timeline(31298): Timeline: Activity_launch_request id:apps.s.r.sh time:126576611
11-29 18:52:57.031: W/ResourcesManager(31298): getTopLevelResources: /data/app/apps.s.r.sh-1/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.031: W/ResourcesManager(31298): getTopLevelResources: /data/app/apps.s.r.sh-1/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.081: W/ResourcesManager(31298): getTopLevelResources: /data/app/com.google.android.gms-1/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.261: W/DynamiteModule(31298): Failed to load module via V2: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader" on path: DexPathList[[zip file "/data/app/apps.s.r.sh-1/base.apk"],nativeLibraryDirectories=[/data/app/apps.s.r.sh-1/lib/arm, /vendor/lib, /system/lib]]
11-29 18:52:57.271: I/DynamiteModule(31298): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:10900
11-29 18:52:57.271: I/DynamiteModule(31298): Selected remote version of com.google.android.gms.ads.dynamite, version >= 10900
11-29 18:52:57.311: W/ResourcesManager(31298): getTopLevelResources: /data/app/com.google.android.gms-1/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.371: W/System(31298): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/00000094/n/armeabi-v7a
11-29 18:52:57.371: W/System(31298): ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/00000094/n/armeabi
11-29 18:52:57.381: W/ResourcesManager(31298): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000094/AdsDynamite.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.391: W/ResourcesManager(31298): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000094/AdsDynamite.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.391: D/DynamitePackage(31298): Instantiated singleton DynamitePackage.
11-29 18:52:57.391: D/DynamitePackage(31298): Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
11-29 18:52:57.531: I/Ads(31298): Updating ad debug logging enablement.
11-29 18:52:57.541: I/Ads(31298): Use AdRequest.Builder.addTestDevice("5165705B1A22CACD4E59EB67DC3FCE56") to get test ads on this device.
11-29 18:52:57.621: W/Ads(31298): Invoke Firebase method getInstance error.
11-29 18:52:57.621: W/Ads(31298): The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
11-29 18:52:57.631: W/DynamiteModule(31298): Failed to load module via V2: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader" on path: DexPathList[[zip file "/data/app/apps.s.r.sh-1/base.apk"],nativeLibraryDirectories=[/data/app/apps.s.r.sh-1/lib/arm, /vendor/lib, /system/lib]]
11-29 18:52:57.641: I/DynamiteModule(31298): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:10900
11-29 18:52:57.641: I/DynamiteModule(31298): Selected remote version of com.google.android.gms.ads.dynamite, version >= 10900
11-29 18:52:57.641: I/WebViewFactory(31298): Loading com.google.android.webview version 70.0.3538.110 (code 353811000)
11-29 18:52:57.661: W/ResourcesManager(31298): getTopLevelResources: /data/data/com.google.android.gms/app_chimera/m/00000094/AdsDynamite.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.661: D/SecWifiDisplayUtil(31298): Metadata value : none
11-29 18:52:57.661: D/ViewRootImpl(31298): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{4488dba I.E...... R.....ID 0,0-0,0}
11-29 18:52:57.681: W/Ads(31298): Update ad debug logging enablement as false
11-29 18:52:57.751: W/ResourcesManager(31298): getTopLevelResources: /data/app/com.google.android.webview-2/base.apk / 1.0 running in apps.s.r.sh rsrc of package null
11-29 18:52:57.761: D/ViewRootImpl(31298): MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
11-29 18:52:57.771: W/DisplayListCanvas(31298): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
11-29 18:52:57.791: I/Timeline(31298): Timeline: Activity_idle id: android.os.BinderProxy@e9b4ee5 time:126577403
11-29 18:52:57.901: I/art(31298): Rejecting re-init on previously-failed class java.lang.Class<hs>
11-29 18:52:57.901: I/art(31298): Rejecting re-init on previously-failed class java.lang.Class<hs>
11-29 18:52:57.921: V/ActivityThread(31298): updateVisibility : ActivityRecord{47d0972 token=android.os.BinderProxy@1308390 {apps.s.r.sh/apps.s.r.sh.First}} show : false
11-29 18:52:57.921: I/cr_LibraryLoader(31298): Time to load native libraries: ? ms (timestamps ????-????)
11-29 18:52:57.991: I/chromium(31298): [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
11-29 18:52:57.991: I/cr_LibraryLoader(31298): Expected native library version number "70.0.3538.110", actual native library version number "70.0.3538.110"
11-29 18:52:58.821: I/Ads(31298): Ad failed to load : 3

该应用程序正常工作,但广告未展示!

5 个答案:

答案 0 :(得分:0)

您可以选中此link

  

它只是说您的代码是正确的。问题是AdMob确实   并非总是有一个广告可为每个请求返回。这可能发生   特别是如果您刚刚注册了AdMob发布商ID,   新ID开始之前需要花费一些时间和多个请求   返回广告。

等待一段时间可能是您刚刚创建了广告ID,但是如果不是这样的话 然后尝试更改应用程序包名称,即应用程序ID

如何更改Android应用包名称?

  1. 要更改android应用的程序包名称,请转到“项目”窗口, 右键单击该应用,然后选择“打开模块设置”,
  2. 将出现一个新窗口,在窗口中选择“风味”选项卡。 这是我们将更改应用程序包名称的地方,即 application id 重命名为任何内容,只需遵循语法

enter image description here

答案 1 :(得分:0)

我的问题通过以下方法更改了软件包名称来解决:

1-右键单击项目

2- android工具

3-重命名应用程序包

检查清单以确保软件包名称已更改

然后:

项目--->清洁

答案 2 :(得分:0)

实际上我无法理解该解决方案,如果您在代码中更改程序包名称,则还应该在播放控制台中更改该应用程序,因为Google希望所有发行版都具有相同的程序包名称。您是否在控制台中创建了新应用? @Sh R S

答案 3 :(得分:0)

您只需要等待3-5天。

答案 4 :(得分:0)

如果您收到此错误代码3 ,则您的代码是正确的。问题是AdMob并非总是有一个广告可为每个请求返回。 ...您的填充率较低的另一个原因是您没有启用AdSense补余,或者您滤除了一些广告。检查您的应用设置,看是否是这种情况