FATAL EXCEPTION: GoogleApiHandler

烂漫一生 提交于 2020-02-02 03:32:38

问题


In my project i'm using the monetization service(Vungle/AppLovin). When I'm trying to load an ad, i get this exception

E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler Process: kz.ikar, PID: 3673 java.lang.NoSuchMethodError: No virtual method setChannelId(Ljava/lang/String;)Landroid/support/v4/app/NotificationCompat$Builder; in class Landroid/support/v4/app/NotificationCompat$Builder; or its super classes (declaration of 'android.support.v4.app.NotificationCompat$Builder' appears in /data/app/kz.ikar-2oCl4DY4J8w7wP-jirbYvA==/split_lib_dependencies_apk.apk) at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source:225) at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source:15) at com.google.android.gms.common.api.internal.zzbm.zzc(Unknown Source:4) at com.google.android.gms.common.api.internal.zzbo.onConnectionFailed(Unknown Source:104) at com.google.android.gms.common.api.internal.zzbo.connect(Unknown Source:83) at com.google.android.gms.common.api.internal.zzbo.zza(Unknown Source:47) at com.google.android.gms.common.api.internal.zzbm.handleMessage(Unknown Source:283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:164) at android.os.HandlerThread.run(HandlerThread.java:65)

In my project I have two fragments in one activity. The user gets an ad in the second one. If I load an ad from the activity, it works well. What can be the cause of this issue?

By the way both ad networks(Vungle and AppLovin) return this exception


回答1:


I had the same problem and I fixed it downgrading to firebase Google Play services 11.6.0




回答2:


One reason you could be getting this error is if your buildToolsVersion in your app-level Gradle is less than 26. Either that or your v4 support is less than 26.0.0 seeing as NotificationCompat.Builder was added in API 26.



来源:https://stackoverflow.com/questions/48185978/fatal-exception-googleapihandler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!