Could not find class com.google.firebase.FirebaseOptions'

I have a working application and everything works well, but when I updated it using the MoPub application and generated a new signed APK and uploaded it to the game store, some users reported a crash when it worked well on other device users.

I tested the application a lot on different devices and finally found a device in which it crashed.

I debugged the application and found this error code on the Android monitor.

06-18 16: 17: 51.665 17951-17951 / akhbar4all.com.akhbar4all W / dalvikvm: VFY: cannot find the class specified in the signature (Lcom / google / firebase / auth / FirebaseUser;) 06-18 16: 17: 51.665 17951-17951 / akhbar4all.com.akhbar4all E / dalvikvm: Could not find class 'com.google.firebase.FirebaseApp $ zza', link to method com.google.firebase.FirebaseApp.zza 06-18 16: 17: 51.665 17951 -17951 / akhbar4all.com.akhbar4all W / dalvikvm: VFY: it is not possible to allow verification 9003 (Lcom / google / firebase / FirebaseApp $ zza;) in Lcom / Google / firebase / FirebaseApp; 06-18 16: 17: 51,665 17951-17951 / akhbar4all.com.akhbar4all D / dalvikvm: VFY: change operation code 0x1f to 0x0019 06-18 16: 17: 51,665 17951-17951 / akhbar4all.com.akhbar4all D / dalvikvm: DexOpt: failed opt direct call 0xec65 at 0x0b in Lcom / google / firebase / FirebaseApp; .getToken 06-18 16: 17: 51.665 17951-17951 / akhbar4all.com.akhbar4all D / AndroidRuntime: shutdown V.M. 06-18 16: 17: 51.665 17951-17951 / akhbar4all.com.akhbar4all W / dalvikvm: threadid = 1: thread output with an uncaught exception (group = 0x41bdc700) 06-18 16: 17: 51,685 17951-17951 / akhbar4all.com .akhbar4all E / AndroidRuntime: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions at com.google.firebase.FirebaseApp.zzbu (Unknown source) at com.google.firebase.providerefrer.brer.reirebrer.reirebrer. Unknown Source) in android.content.ContentProvider.attachInfo (ContentProvider.java:1214) in android.content.ContentProvider.attachInfo (ContentProvider.java:1189) in com.google.firebase.provider.FirebaseInitProvider.attachInfo (Unknown Source) in android.app.ActivityThread.installProvider (ActivityThread.java∗119) in android.app .ActivityThread.installContentProviders (ActivityThread.java:4725) in android.app.ActivityThread.handleBindApplication (ActivityThread.java:4665) at android.app.ActivityThread.access $ 1400 (ActivityThread.java:159) in android.app.Acti vityThread $ H.handleMessage (ActivityThread.java:1376) on android.os.Handler.dispatchMessage (Handler.java:99) on android.os.Looper.loop (Looper.java:176) at android.app.ActivityThread.main (ActivityThread.java:5419) in java.lang.reflect.Method.invokeNative (native method) in java.lang.reflect.Method.invoke (Method.java∗25) in com.android.internal.os.ZygoteInit $ MethodAndArgsCaller .run (ZygoteInit.java:1046) at com.android.in ternal.os.ZygoteInit.main (ZygoteInit.java:862) in dalvik.system.NativeStart.main (native method)

But I was shocked because I did not use the Firebase api , so why is this happening and what is the solution? I would be happy for any help from someone.

+5
source share
2 answers

I solved the problem.

The problem was that their bug in firebase, including the latest Google Play services 9.0.2

So, I select only those google services that I need, and not all services except (firebase), and everything works fine

To configure google services as you wish and not include all services, visit this link

+10
source

Thank you, I also compiled the multidex class to solve my problem, but it made my application a little harder, now it is optimized!

This compiles only the google services that you are going to use, and not all with the compilation instruction 'com.google.android.gms: play-services: 9.0.0'

Now my gradle file looks like this

 //compile 'com.android.support:multidex:1.0.0' //compile 'com.google.android.gms:play-services:9.0.0' compile 'com.google.firebase:firebase-messaging:9.0.0' compile 'com.google.firebase:firebase-core:9.0.0' compile 'com.google.firebase:firebase-database:9.0.0' compile 'com.google.android.gms:play-services-location:9.0.0' 
0
source

All Articles