You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if Activity is destroyed while the banner is expanded, it will throw a memory leak error:
android.view.WindowLeaked: Activity com.google.android.gms.example.bannerexample.MyActivity has leaked window android.widget.PopupWindow$PopupDecorView{d7bc3fa V.E...... R......D 0,0-1438,1477} that was originally added here (Ask Gemini)
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:733)
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:717)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:399)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:109)
at android.widget.PopupWindow.invokePopup(PopupWindow.java:1576)
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1342)
at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1308)
at com.google.android.gms.ads.internal.gmsg.ar.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1383)
at com.google.android.gms.ads.internal.webview.r.x(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:52)
at com.google.android.gms.ads.internal.webview.r.e(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:100)
at com.google.android.gms.ads.internal.webview.al.run(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:25)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at m.azn.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
at com.google.android.gms.ads.internal.util.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
at m.azn.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
loadBanner method used in Banner example:
private void loadBanner() {
// Create a new ad view.
adView = new AdView(this);
adView.setAdUnitId(AD_UNIT_ID);
adView.setAdSize(getAdSize());
// Replace ad container with new ad view.
adContainerView.removeAllViews();
adContainerView.addView(adView);
Bundle extras = new Bundle();
extras.putString("collapsible", "bottom");
extras.putString("collapsible_request_id", UUID.randomUUID().toString());
// Start loading the ad in the background.
AdRequest adRequest = new AdRequest.Builder()
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
adView.loadAd(adRequest);
}
The text was updated successfully, but these errors were encountered:
if Activity is destroyed while the banner is expanded, it will throw a memory leak error:
loadBanner method used in Banner example:
The text was updated successfully, but these errors were encountered: