9

If found that the users which use old devices (2.3.6) send me this uncatched exception:

java.lang.NoClassDefFoundError: ayc
at ajb.a(:com.google.android.gms.DynamiteModulesA:20)
at po.a(:com.google.android.gms.DynamiteModulesA:536)
at po.a(:com.google.android.gms.DynamiteModulesA:144)
at qn.a(:com.google.android.gms.DynamiteModulesA:150)
at pm.a(:com.google.android.gms.DynamiteModulesA:312)
at ul.onTransact(:com.google.android.gms.DynamiteModulesA:81)
at android.os.Binder.transact(Binder.java:279)
at com.google.android.gms.ads.internal.client.zzu$zza$zza.zzb(Unknown Source)
at com.google.android.gms.ads.internal.client.zzac.zza(Unknown Source)
at com.google.android.gms.ads.InterstitialAd.loadAd(Unknown Source)
at my.app.q.g(ABase.java:196)
at my.app.q.f(ABase.java:183)
at my.app.q.onCreate(ABase.java:88)
at my.app.AMain.onCreate(AMain.java:53)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
at android.app.ActivityThread.access$1500(ActivityThread.java:121)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3770)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)

The code at error line is this:

mInterstitialAd = new InterstitialAd(this);
//... some defenitions
AdRequest adRequest = new AdRequest.Builder().build();
mInterstitialAd.loadAd(adRequest);/// <<< THE ERROR APPEARS

Is it possible to fix this bug without wrapping try-(catch Exception e)-finally?

Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
  • Can you show your `gradle` ? – Shree Krishna May 15 '16 at 08:54
  • Are you sure you've `GoogleAdMobAdsSdk-package.` checked ? like here in [this](http://stackoverflow.com/a/10632156/5067493) answer. – Shree Krishna May 15 '16 at 08:58
  • @ShreeKrishna , I'm using Eclipse. This code works in all other devices exapt very old. I'm using up-to-date Google SDK libs. – Vyacheslav May 15 '16 at 09:01
  • @Tony, nope. I do not understand the core of the error. – Vyacheslav May 15 '16 at 13:50
  • @Vyacheslav me neither, I have several apps suffering from same error. All of them are between version 2.3.3 and 23.7 – Tony May 15 '16 at 15:43
  • Does it occur only on GB devices? How often does it occur? Can you please provide more statistics and maybe write them on this bug report: https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/android/_kYrMS5nVxE ? – android developer May 16 '16 at 09:00

2 Answers2

9

This is an SDK issue, rather than something wrong in your code.

The release of Play services that just rolled out contains a Mobile Ads bug that affects devices running Gingerbread. Engineering's aware of it, a fix has been created, and it will go out in the next release.

RedBrogdon
  • 5,113
  • 2
  • 24
  • 31
  • 3
    I've created a bug report for this here: https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/android/_kYrMS5nVxE . BTW, it happens to me, and I use normal banner ads (no InterstitialAd ) – android developer May 16 '16 at 05:23
3

This is what I was told in the bug report of this issue:

As you are probably aware, the cause of the crash was SDK-related. A fix is in the pipeline, and scheduled to go live in the next SDK release.

And later:

The most recent release of Google Play services contains a bug affecting devices running Gingerbread. The SDK team has identified the problem and created a server-side workaround that should eliminate it. These crashes should tail off in the coming days, so you should expect to see fewer and fewer of them going forward.

So, this is being fixed via the server, and you will get less reports till it reaches 0%.

Wish all bugs were handled this way :)

android developer
  • 114,585
  • 152
  • 739
  • 1,270