Flutter - Google移动的广告-广告在几秒钟后消失

0lvr5msh  于 2023-05-18  发布在  Flutter
关注(0)|答案(1)|浏览(224)

测试广告会在几秒钟后自动消失,并在日志下方:

  1. I/Ads (24763): This request is sent from a test device.
  2. W/ConnectionStatusConfig(24763): Dynamic lookup for intent failed for action: com.google.android.gms.ads.service.CACHE
  3. W/ConnectionStatusConfig(24763): Dynamic lookup for intent failed for action: com.google.android.gms.ads.service.START
  4. D/EgretLoader(24763): EgretLoader(Context context)
  5. D/EgretLoader(24763): The context is not activity
  6. I/DynamiteModule(24763): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:231004600
  7. I/DynamiteModule(24763): Selected remote version of com.google.android.gms.ads.dynamite, version >= 231004600
  8. W/ContentCatcher(24763): Failed to notify a WebView
  9. W/ContentCatcher(24763): Failed to notify a WebView
  10. D/Surface (24763): lockHardwareCanvas
  11. W/chromium(24763): [WARNING:display_webview.cc(32)] WebView overlays are enabled!
  12. E/FrameEvents(24763): updateAcquireFence: Did not find frame.
  13. I/GED (24763): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 27, oppidx_max 27, oppidx_min 0
  14. I/GED (24763): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 27, oppidx_max 27, oppidx_min 0
  15. D/Surface (24763): lockHardwareCanvas
  16. E/FrameEvents(24763): updateAcquireFence: Did not find frame.
  17. W/ContentCatcher(24763): Failed to notify a WebView

所用 Package :google_mobile_ads
配置与文档中的相同。
广告不能消失。

azpvetkf

azpvetkf1#

在android/app/src/main/AndroidManifest.xml文件的标签中添加以下元数据:

  1. <meta-data
  2. android:name="com.google.android.gms.ads.APPLICATION_ID"
  3. android:value="ca-app-pub-[your id]" />

如果您使用的是Android 12或13,请在标记后添加以下行(如果已添加)忽略它

  1. <uses-permission android:name="com.google.android.gms.permission.YOUR_AD_ID"/>

卸载并安装您的应用
检查您的ID是否在admob中处于活动状态
关闭任何广告拦截器或广告拦截DNS

相关问题