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

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

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

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

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

azpvetkf

azpvetkf1#

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

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

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

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

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

相关问题