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
Found this solution by Mateusz Matela at https://groups.google.com/forum/#!topic/google-admob-ads-sdk/DkjtCx_Zvn8.
I have tried on a Motorola DEFY+ that crashed from this bug two out of three times. It seems to work even when the warnings assositated with this bug appears in the log. It even says "AdWorker thread thrown an exception". My ads even reappeard when continuing to use the app.
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);
}
}
});