java.lang.NoSuchMethodError: No static method zzb - android

I got the error, whenever I run my app on my phone:
FATAL EXCEPTION: main
E/AndroidRuntime(18680): java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzaa; or its super classes (declaration of 'com.google.android.gms.common.internal.zzaa' appears in /data/app/***/base.apk)
E/AndroidRuntime(18680): at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source)
E/AndroidRuntime(18680): at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
E/AndroidRuntime(18680): at android.app.ActivityThread.installProvider(ActivityThread.java:5159)
E/AndroidRuntime(18680): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4754)
E/AndroidRuntime(18680): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4694)
E/AndroidRuntime(18680): at android.app.ActivityThread.access$1600(ActivityThread.java:150)
E/AndroidRuntime(18680): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
E/AndroidRuntime(18680): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(18680): at android.os.Looper.loop(Looper.java:148)
E/AndroidRuntime(18680): at android.app.ActivityThread.main(ActivityThread.java:5423)
E/AndroidRuntime(18680): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18680): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/AndroidRuntime(18680): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I imported Facebook SDK, Firebase, Adjust, Unity Purchasing and Smartfox to my Unity Project.
I mentioned the problem in my previous topic and I think that opening new topic for the problem will be better. Here is my previous topic which is related to this one for better understanding:
Google.JarResolver.ResolutionException: Cannot resolve com.google.firebase:firebase-analytics-unity:1.0.0()
If you need further information, let me know.

try to
1. in your build.gradle put this:
defaultConfig {
[...]
multiDexEnabled true
}
2. Make your application class extend MultiDexApplication

See answer at NoSuchMethodError: No static method zzb
compile 'com.google.firebase:firebase-core:10.0.0'

You lack a jar package play-server-basement.jar

Related

Issue: java.lang.NoSuchMethodError: No static method printStackTrace(Ljava/lang/Throwable;) in Google playstore

I am getting pre launch report in my playstore as this:
Error Log -
java.lang.NoSuchMethodError: No static method printStackTrace(Ljava/lang/Throwable;)V in class Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension; or its super classes (declaration of 'com.google.devtools.build.android.desugar.runtime.ThrowableExtension' appears in /data/app/com.google.android.apps.mtaas.crawler-1/base.apk)
FATAL EXCEPTION: ControllerMessenger
Process: com.veblr.videomate, PID: 17578
java.lang.NoSuchMethodError: No static method printStackTrace(Ljava/lang/Throwable;)V in class Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension; or its super classes (declaration of 'com.google.devtools.build.android.desugar.runtime.ThrowableExtension' appears in /data/app/com.google.android.apps.mtaas.crawler-1/base.apk)
at com.veblr.videomate.SpashScreenActiviy.updateAndroidSecurityProvider(Unknown Source)
at com.veblr.videomate.VideoPlayerActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6013)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.support.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:667)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2466)
at android.app.ActivityThread.access$1200(ActivityThread.java:152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1341)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.support.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:148)
at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:466)
at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:420)
at android.support.test.espresso.base.UiControllerImpl.injectMotionEvent(UiControllerImpl.java:234)
at android.support.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:140)
at android.support.test.espresso.action.MotionEvents.sendUp(MotionEvents.java:123)
at android.support.test.espresso.action.Tap.sendSingleTap(Tap.java:170)
at android.support.test.espresso.action.Tap.access$100(Tap.java:31)
at android.support.test.espresso.action.Tap$1.sendTap(Tap.java:46)
at android.support.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:136)
at android.support.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:355)
at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:242)
at android.support.test.espresso.ViewInteraction.access$100(ViewInteraction.java:62)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:149)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:146)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5538)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
This is my logcat which is showing inthe report.
I can not find out what the problem is with my app.
This is the device in which the error is showing :
Apparently there's at least someone else experiencing the same issue as yours: App crash due to not found exception method printStateTrace in Android issue tracker.
Maybe if you can provide additional information they will be able to investigate the issue.
Another similar issue was because of a bug in Gradle plugin, so maybe you can try to update it.

No static method G()Landroid/content/Intent; when try to receive message from firebase

FATAL EXCEPTION: main Process: com.myfirebase.main, PID: 30567
java.lang.NoSuchMethodError: No static method G()Landroid/content/Intent; in class Lcom/google/firebase/iid/FirebaseInstanceIdInternalReceiver; or its super classes (declaration of 'com.google.firebase.iid.FirebaseInstanceIdInternalReceiver' appears in /data/app/com.riseandshine.risenshine-2/base.apk)
at com.google.firebase.messaging.FirebaseMessagingService.zzae(Unknown Source)
at com.google.firebase.iid.zzb.onStartCommand(Unknown Source)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3088)
at android.app.ActivityThread.access$2100(ActivityThread.java:170)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1539)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5576)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
This error is comming when I am trying to use firebase messaging service. I have tried to find the solution, but could not get it.
My question is... is there anyone who faced the same problem as mine?
And also, What is the method G() used for?
Please help.

Google Cast crash on stop casting

My custom sender application is crashing whenever I'm clicking 'STOP CASTING' on the cast-options menu in the app. The error I'm getting is:
java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setCallback(MediaSessionCompat.java:2305)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:267)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:255)
at com.google.android.gms.internal.zznv.zzen(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zzei(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zza(Unknown Source)
at com.google.android.gms.cast.framework.CastSession$zzb.zzei(Unknown Source)
at com.google.android.gms.cast.framework.zzf$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at zv.a(:com.google.android.gms.DynamiteModulesC:199)
at zl.a(:com.google.android.gms.DynamiteModulesC:128)
at aaa.onTransact(:com.google.android.gms.DynamiteModulesC:122)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.cast.framework.zzh$zza$zza.zzb(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.end(Unknown Source)
at com.google.android.gms.cast.framework.Session$zza.end(Unknown Source)
at com.google.android.gms.cast.framework.zzq$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at abc.a(:com.google.android.gms.DynamiteModulesC:216)
at abk.a(:com.google.android.gms.DynamiteModulesC:303)
at acg.a(:com.google.android.gms.DynamiteModulesC:70)
at acg.e(:com.google.android.gms.DynamiteModulesC:38)
at acd.onTransact(:com.google.android.gms.DynamiteModulesC:126)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.internal.zznn$zza$zza.zzg(Unknown Source)
at com.google.android.gms.internal.zznq.onRouteUnselected(Unknown Source)
at android.support.v7.media.MediaRouter$Callback.onRouteUnselected(MediaRouter.java:1787)
at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:2999)
at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:2946)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
and I can't seem to find anyone with this error. I've followed https://github.com/googlecast/CastHelloText-android/ to the point. I will post the full activity here if it's wanted.
I've found answer on google issue tracking system on https://issuetracker.google.com/issues/37129745
In short, update v7 supprt library to 25.1.1

multiple JSON fields named exception in “RELEASE” build mode only

This is weird but serialization is done perfectly fine in DEBUG build mode as well as in all of the API responses except one. But in release mode, it's throwing illegal argument exception.
Here is the complete log for this exception:
FATAL EXCEPTION: main Process: com.example.sampleapp, PID: 30480 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sampleapp/com.example.sampleapp.activity.ManageStoreActivity}: java.lang.IllegalArgumentException: Unable to create converter for class com.example.sampleapp.model.seller.SellerStoreFormData
for method ApiInterface.getSellerInfoData
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.IllegalArgumentException: Unable to create converter for class com.example.sampleapp.model.seller.SellerStoreFormData
for method ApiInterface.getSellerInfoData
at retrofit2.ServiceMethod$Builder.methodError(Unknown Source)
at retrofit2.ServiceMethod$Builder.createResponseConverter(Unknown Source)
at retrofit2.ServiceMethod$Builder.build(Unknown Source)
at retrofit2.Retrofit.loadServiceMethod(Unknown Source)
at retrofit2.Retrofit$1.invoke(Unknown Source)
at java.lang.reflect.Proxy.invoke(Proxy.java:393)
at $Proxy0.getSellerInfoData(Unknown Source)
at com.example.sampleapp.connection.a.i(Unknown Source)
at com.example.sampleapp.activity.ManageStoreActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
... 9 more
Caused by: java.lang.IllegalArgumentException: class com.example.sampleapp.model.seller.SellerStoreFormData declares multiple JSON fields named f
at com.google.a.b.a.i.a(Unknown Source)
at com.google.a.b.a.i.a(Unknown Source)
at com.google.a.e.a(Unknown Source)
at retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter(Unknown Source)
at retrofit2.Retrofit.nextResponseBodyConverter(Unknown Source)
at retrofit2.Retrofit.responseBodyConverter(Unknown Source)
... 20 more
What I have tried so far ?
I have tried and looked for multiple JSON fields in same and parent
class but didn't find any.
Checked that the #SerializedName is different for each field.
I also have proguard enabled in release mode.
It was working fine earlier (without enabling proguard) and I was not getting any compile time error.
If debug mode is working and release is the problem most chances is that's a proguard issue.
Try excluding SellerStoreFormData from obfuscation.
Also, check if you have proguard Gson configuration in place and if not add it.

FirebaseStorage.getInstance().getReference() crashes app

FirebaseStorage.getInstance().getReference() crashes the app. I have checked another similar post but that did not help as my google-services.json file is correctly downloaded from FireBase API and the FireBase assistant shows connection and status as 'OK'.
here's the log:
A/FirebaseApp: Firebase API initialization failure.
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.google.firebase.FirebaseApp.zza(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1737)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1712)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:6487)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6082)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6022)
at android.app.ActivityThread.access$1700(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1766)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal .os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal .os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.NoSuchMethodError: No static method getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File; in class Lcom/google/android/gms/common/util/zzx; or its super classes (declaration of 'com.google.android.gms.common.util.zzx' appears in /data /data /com.example.bhrigu.simpleblog/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-10.0.0_c06534ef2c8c0d287af412696f22ee66b12bcbfa-classes.dex)
at com.google.firebase.iid.zzg.zzkg(Unknown Source)
There was indeed a conflict with the google-play version. Initially, I had used version 9.2.0 for Firebase libraries as I was getting errors with 10.0.0. However fixing the google-play version seems to have taken care of those ones as well. And I am able to run with all the updated libraries.

Categories

Resources