Google Play服务5.0.77

Lui*_*sti 37 android admob google-play-services

从6月25日开始,使用广告的两个不相关的应用程序开始拥有此NPE

java.lang.NullPointerException
   at zo.a(SourceFile:172)
   at aeh.a(SourceFile:120)
   at afw.run(SourceFile:14)
   at afy.run(SourceFile:30)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
   at java.lang.Thread.run(Thread.java:856)
Run Code Online (Sandbox Code Playgroud)

我认为这与谷歌播放服务更新有关.有人能帮我解决这个问题吗?

只是为了确认这个问题与播放服务有关,我已经设法从一个名为AdWorker的线程中从崩解剂中获取此信息:

thread
   at java.lang.Object.wait(Object.java)
   at java.lang.Thread.parkFor(Thread.java:1231)
   at sun.misc.Unsafe.park(Unsafe.java:323)
   at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:813)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:973)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1282)
   at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
   at zo.a(SourceFile:147)
   at zo.a(SourceFile:170)
   at aeh.a(SourceFile:120)
   at afw.run(SourceFile:14)
   at afy.run(SourceFile:30)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
   at java.lang.Thread.run(Thread.java:856)
Run Code Online (Sandbox Code Playgroud)

它不是正确的地方......但是根本没有地方报告它们

它从7月1日开始翻倍的例外数量,现在几乎是6月27日的3倍.

关于Android谷歌代码项目的问题

讨论现在在admob google Heading组的这个主题中

来自谷歌的最后回复"我们知道这些崩溃并正在修复.我们希望在接下来的一两周内推出这些修复程序." (7月7日)

小智 11

Mateusz Matela在https://groups.google.com/forum/#!topic/google-admob-ads-sdk/DkjtCx_Zvn8上找到了这个解决方案.

我试过摩托罗拉DEFY +三次中有两次从这个bug中崩溃了.即使在日志中出现与此错误相关的警告,它似乎也能正常工作.它甚至说"AdWorker线程抛出异常".在继续使用该应用时,我的广告甚至会重新出现.

final UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
        @Override
        public void uncaughtException(Thread thread, Throwable ex) {
            if (thread.getName().startsWith("AdWorker")) {
                Log.w("ADMOB", "AdWorker thread thrown an exception.", ex);
            } else if (defaultHandler != null) {
                defaultHandler.uncaughtException(thread, ex);
            } else {
                throw new RuntimeException("No default uncaught exception handler.", ex);
            }
        }
});
Run Code Online (Sandbox Code Playgroud)