Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.NoClassDefFoundError: ayc for InterstitialAd

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?

like image 753
Vyacheslav Avatar asked May 15 '16 08:05

Vyacheslav


2 Answers

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.

like image 99
RedBrogdon Avatar answered Nov 08 '22 01:11

RedBrogdon


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 :)

like image 3
android developer Avatar answered Nov 08 '22 03:11

android developer