【发布时间】:2022-04-19 07:10:51
【问题描述】:
日志:
2021-12-28 13:15:51.438 17135-17135/app.mark.movierecommendor I/DynamiteModule: Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:213806100
2021-12-28 13:15:51.438 17135-17135/app.mark.movierecommendor I/DynamiteModule: Selected remote version of com.google.android.gms.ads.dynamite, version >= 213806100
2021-12-28 13:15:51.509 17135-17135/app.mark.movierecommendor W/Ads: #004 The webview is destroyed. Ignoring action.
2021-12-28 13:15:51.510 17135-17135/app.mark.movierecommendor I/chatty: uid=10280(app.mark.movierecommendor) identical 1 line
2021-12-28 13:15:51.510 17135-17135/app.mark.movierecommendor W/Ads: #004 The webview is destroyed. Ignoring action.
XML:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adBannerMainActivity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="@string/add_id_with_dash"
/>
代码:
// Launch and Initialize Ad Banner
MobileAds.initialize(this@ActionMoviePageActivity)
val adRequest = AdRequest.Builder().build()
adBannerOther.loadAd(adRequest)
这是第二个活动,第一个工作正常,但是当我按下按钮打开第二个活动时,它给了我这个错误W/Ads: #004 The webview is destroyed. Ignoring action.
【问题讨论】:
-
这不是错误,只是警告。此警告主要在广告刷新期间弹出,或者当 AdView 从视图中分离/删除或主机 Activity 被销毁时弹出。它不会引起任何问题。