'W/Ads: #004 The webview is destroyed. Ignoring action
Logs:
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"
/>
Code:
// Launch and Initialize Ad Banner
MobileAds.initialize(this@ActionMoviePageActivity)
val adRequest = AdRequest.Builder().build()
adBannerOther.loadAd(adRequest)
That's the second activity, first works fine, but when I press the button to open the second actiivty it gives me this error W/Ads: #004 The webview is destroyed. Ignoring action.
Solution 1:[1]
I had the same problem. I fixed it by changing the root element from Constraint layout to relative layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | rohan parab |