ANR вызвано рекламой Google. - PullRequest
       13

ANR вызвано рекламой Google.

1 голос
/ 01 октября 2019

В консоли Google Play - я постоянно получаю ANR, вызванную рекламой Google. приложение, вероятно, зависнет на 0,5 секунды или более.

Передача намерения {act = android.intent.action.SCREEN_ON flg = 0x50200010}, InvisibleToUser

Должен ли я где-нибудь использовать поток? это код, который я использую для запуска рекламы:

'' '

mAdView = findViewById(R.id.ad_view);
MobileAds.initialize(this, "ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxx");
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-7130117754697461/3128896530");
mInterstitialAd.setAdListener(new AdListener()
{
  @Override
  public void onAdLoaded()
  {
   //log interstitial loaded
  }
  @Override
  public void onAdFailedToLoad(int errorCode)
  {
  }
  @Override
  public void onAdClosed()
  {
  //reload interstitial
  AdRequest adRequest = new AdRequest.Builder().build();
  mInterstitialAd.loadAd(adRequest);
  // Ad interstitialAd reLoaded
   }
});
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
'''

это стек, представленный в консоли Google Play

"main" tid=1 Runnable
"main" prio=5 tid=1 Runnable
  | group="main" sCount=0 dsCount=0 flags=0 obj=0x728685e0 self=0xb0384000
  | sysTid=18461 nice=0 cgrp=default sched=0/0 handle=0xb3dbd4a8
  | state=R schedstat=( 1710859708561 515750767270 4655929 ) utm=110119 stm=60966 core=1 HZ=100
  | stack=0xbe79b000-0xbe79d000 stackSize=8MB
  | held mutexes= "mutator lock"(shared held)
  at java.util.Arrays.asList (Arrays.java:3728)
  at dalvik.system.DexPathList.findClass (DexPathList.java:473)
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:91)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
  at com.google.android.gms.ads.internal.util.m.l (m.java:3)
  at com.google.android.gms.ads.ChimeraAdManagerCreatorImpl.newAdManagerByType (ChimeraAdManagerCreatorImpl.java:4)
  at com.google.android.gms.ads.internal.client.at.a (at.java)
  at jy.onTransact (jy.java:3)
  at android.os.Binder.transact (Binder.java:604)
  at csk.a (csk.java:2)
  at com.google.android.gms.ads.internal.client.o.newAdManagerByType (o.java)
  at com.google.android.gms.ads.AdManagerCreatorImpl.newAdManagerByType (AdManagerCreatorImpl.java:6)
  at com.google.android.gms.ads.internal.client.l.a (l.java:18)
  at csj.onTransact (csj.java:3)
  at android.os.Binder.transact (Binder.java:604)
  at com.google.android.gms.internal.ads.zzfm.transactAndReadException (zzfm.java:10)
  at com.google.android.gms.internal.ads.zzzm.zza (zzzm.java:10)
  at com.google.android.gms.internal.ads.zzxv.zza (zzxv.java:6)
  at com.google.android.gms.internal.ads.zzyj.zzow (zzyj.java:7)
  at com.google.android.gms.internal.ads.zzyq.zzoz (zzyq.java:29)
  at com.google.android.gms.internal.ads.zzyq.zzd (zzyq.java:54)
  at com.google.android.gms.internal.ads.zzabb.zza (zzabb.java:40)
  at com.google.android.gms.ads.InterstitialAd.loadAd (InterstitialAd.java:9)
  at com.arbelsolutions.BVRUltimate.GalleryActivity.ConfigAds (GalleryActivity.java:156)
  at com.arbelsolutions.BVRUltimate.GalleryActivity.acknowledgedPurchase (GalleryActivity.java:301)
  at com.arbelsolutions.BVRUltimate.PlayDonateClient.onBillingSetupFinished (PlayDonateClient.java:101)
  at com.android.billingclient.api.BillingClientImpl$BillingServiceConnection$1.run (BillingClientImpl.java:1521)
- locked <0x0ddd2f0b> (a java.lang.Object)
  at android.os.Handler.handleCallback (Handler.java:789)
  at android.os.Handler.dispatchMessage (Handler.java:98)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6592)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:769)
...