Google play services 5.0.77

前端 未结 10 1435
我寻月下人不归
我寻月下人不归 2021-01-30 04:23

From the 25th of june two unrelated apps that are using ads started to have this NPE

java.lang.NullPointerException
   at zo.a(SourceFile:172)
   at aeh.a(SourceF         


        
10条回答
  •  甜味超标
    2021-01-30 04:38

    This is a partial solution and it seems (so far) to fix 100% the crashes: you should postpone the ad request a few milliseconds to avoid this crash!

    Simplified example:

        Handler handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                AdRequest adRequest = new AdRequest.Builder().build();
                adView.loadAd(adRequest);
                super.handleMessage(msg);
            }
        };
    
        if (handler != null) {
            handler.sendEmptyMessageDelayed(0, 200);
        }
    

提交回复
热议问题