React-native-fcm: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;

Created on 11 Jul 2018  路  57Comments  路  Source: evollu/react-native-fcm

 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source:2)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6335)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5850)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5758)
        at android.app.ActivityThread.-wrap1(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1668)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:172)
        at android.app.ActivityThread.main(ActivityThread.java:6590)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/com.MYapp-ueUe2odQ-WU5yF60E7bQaw==/base.apk"],nativeLibraryDirectories=[/data/app/com.MYapp-ueUe2odQ-WU5yF60E7bQaw==/lib/arm, /data/app/com.MYapp-ueUe2odQ-WU5yF60E7bQaw==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source:2) 
        at android.app.ActivityThread.installProvider(ActivityThread.java:6335) 
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5850) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5758) 
        at android.app.ActivityThread.-wrap1(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1668) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:172) 
        at android.app.ActivityThread.main(ActivityThread.java:6590) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
07-11 13:45:12.660 32203-32203/? I/Process: Sending signal. PID: 32203 SIG: 9

Most helpful comment

I had same issue, after trying lots of things, this fixed this issue for me:

  1. added googlePlayServicesVersion=12.0.1 to gradle.properties (I guess it's unnecessary)
  2. added following to android/build.gradle:
 allprojects {
    repositories {
    //start here
    configurations.all {
 resolutionStrategy.eachDependency { DependencyResolveDetails details ->
   def requested = details.requested
       if (requested.group == 'com.google.android.gms') {
          details.useVersion '12.0.1'
       }
       if (requested.group == 'com.google.firebase') {
          details.useVersion '12.0.1'
         }
       }
     }
    //end
     jcenter()
       maven {
         url "https://maven.google.com"
       }
     }
 }

I've found this in https://github.com/idehub/react-native-google-analytics-bridge/wiki/Solution-for-Android-build-failure-issues

All 57 comments

I had same issue, after trying lots of things, this fixed this issue for me:

  1. added googlePlayServicesVersion=12.0.1 to gradle.properties (I guess it's unnecessary)
  2. added following to android/build.gradle:
 allprojects {
    repositories {
    //start here
    configurations.all {
 resolutionStrategy.eachDependency { DependencyResolveDetails details ->
   def requested = details.requested
       if (requested.group == 'com.google.android.gms') {
          details.useVersion '12.0.1'
       }
       if (requested.group == 'com.google.firebase') {
          details.useVersion '12.0.1'
         }
       }
     }
    //end
     jcenter()
       maven {
         url "https://maven.google.com"
       }
     }
 }

I've found this in https://github.com/idehub/react-native-google-analytics-bridge/wiki/Solution-for-Android-build-failure-issues

@sijad thanks bro, work

@sijad lot of thanks, you made my day bro

thank you its work

Thank you sir, its working now

@sijad thank you <3

Thanks a lot!! It works!!

Thanks this solved my issue.

Thanks man it works!

Thank you... you are my hero... T - T

Thank you very much man... I almost gave up on the error

THANK YOU VERY MUCH !!

thanks you!

Thanks a lot! I almost gave up on the app

10-30 13:57:36.419 10313-10313/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.javasampleapproach.firebase.cloudfirestore, PID: 10313
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
at com.google.firebase.firestore.FirebaseFirestore.zze(Unknown Source)
at com.google.firebase.firestore.FirebaseFirestore.getInstance(Unknown Source)
at com.javasampleapproach.firebase.cloudfirestore.MainActivity.onCreate(MainActivity.java:44)
at android.app.Activity.performCreate(Activity.java:6692)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1140)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2709)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2825)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6339)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/com.javasampleapproach.firebase.cloudfirestore-1/base.apk"],nativeLibraryDirectories=[/data/app/com.javasampleapproach.firebase.cloudfirestore-1/lib/arm, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.firebase.firestore.FirebaseFirestore.zze(Unknown Source)聽
at com.google.firebase.firestore.FirebaseFirestore.getInstance(Unknown Source)聽
at com.javasampleapproach.firebase.cloudfirestore.MainActivity.onCreate(MainActivity.java:44)聽
at android.app.Activity.performCreate(Activity.java:6692)聽
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1140)聽
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2709)聽
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2825)聽
at android.app.ActivityThread.-wrap12(ActivityThread.java)聽
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)聽
at android.os.Handler.dispatchMessage(Handler.java:110)聽
at android.os.Looper.loop(Looper.java:203)聽
at android.app.ActivityThread.main(ActivityThread.java:6339)聽
at java.lang.reflect.Method.invoke(Native Method)聽
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084)聽
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)聽
10-30 13:58:06.441 10313-10342/com.javasampleapproach.firebase.cloudfirestore E/FirebaseInstanceId: Token retrieval failed: SERVICE_NOT_AVAILABLE

.............................................................
How can i fix this problem??? anyone help me..

2018-12-13 17:40:14.599 20334-20334/com.innoart.justcopy E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.innoart.justcopy, PID: 20334
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
at com.google.android.gms.auth.api.Auth.(Unknown Source:0)
at com.innoart.justcopy.GoogleSignIn.onCreate(GoogleSignIn.java:41)
at android.app.Activity.performCreate(Activity.java:7032)
at android.app.Activity.performCreate(Activity.java:7023)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1236)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2814)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2943)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1630)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6626)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/com.innoart.justcopy-qG1SGsDM4a_ERbLCqGzEXQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.innoart.justcopy-qG1SGsDM4a_ERbLCqGzEXQ==/lib/arm, /data/app/com.innoart.justcopy-qG1SGsDM4a_ERbLCqGzEXQ==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.auth.api.Auth.(Unknown Source:0)聽
at com.innoart.justcopy.GoogleSignIn.onCreate(GoogleSignIn.java:41)聽
at android.app.Activity.performCreate(Activity.java:7032)聽
at android.app.Activity.performCreate(Activity.java:7023)聽
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1236)聽
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2814)聽
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2943)聽
at android.app.ActivityThread.-wrap11(Unknown Source:0)聽
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1630)聽
at android.os.Handler.dispatchMessage(Handler.java:106)聽
at android.os.Looper.loop(Looper.java:164)聽
at android.app.ActivityThread.main(ActivityThread.java:6626)聽
at java.lang.reflect.Method.invoke(Native Method)聽
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)聽
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)聽


Im getting this error . How can i fix ?

@sijad Thanks for the solution. It work's for me.

Thank buddy. It's working for me...

隆Muchas gracias!

@sijad Thanks it works for me also .

Thanks, it saved my day.........

I had same issue, after trying lots of things, this fixed this issue for me:

1. added `googlePlayServicesVersion=12.0.1` to `gradle.properties` (I guess it's unnecessary)

2. added following to `android/build.gradle`:
 allprojects {
    repositories {
    //start here
    configurations.all {
 resolutionStrategy.eachDependency { DependencyResolveDetails details ->
   def requested = details.requested
       if (requested.group == 'com.google.android.gms') {
          details.useVersion '12.0.1'
       }
       if (requested.group == 'com.google.firebase') {
          details.useVersion '12.0.1'
         }
       }
     }
    //end
     jcenter()
       maven {
         url "https://maven.google.com"
       }
     }
 }

I've found this in https://github.com/idehub/react-native-google-analytics-bridge/wiki/Solution-for-Android-build-failure-issues

worked like a charm. thanks

@sijad you have saved a lot of time bro.. thanks its working.. :)

@sijad it worked, thanks!

@sijad Thanks a lot, worked...

thanks , it worked <3

Thanks a lot, it's resolved

it worked thank alot.

It works fine in debug and giving build error on enabling the release by enabling the progaurd. any specific reason for this

thanks @sijad worked like a piece of cake .

worked for me, crazy thanks!

thanks brother

Thanks alot.
Wasted alot of time finally got this answer and it worked like a charm.

Thank you so much.

Worked for me in RN 0.60.5 as well, thanks mate!

Thank you so much. Works for me

@sijad Thank you so much. Works for me

Thank you so much. Works for me

A lot thanks !! your kindness help me resolve my issue !

thanks @sijad it works fine for me

@sijad > thanks, it's work

thank you soooo much brother it's working ^^

I had same issue, after trying lots of things, this fixed this issue for me:

  1. added googlePlayServicesVersion=12.0.1 to gradle.properties (I guess it's unnecessary)
  2. added following to android/build.gradle:
 allprojects {
    repositories {
    //start here
    configurations.all {
 resolutionStrategy.eachDependency { DependencyResolveDetails details ->
   def requested = details.requested
       if (requested.group == 'com.google.android.gms') {
          details.useVersion '12.0.1'
       }
       if (requested.group == 'com.google.firebase') {
          details.useVersion '12.0.1'
         }
       }
     }
    //end
     jcenter()
       maven {
         url "https://maven.google.com"
       }
     }
 }

I've found this in https://github.com/idehub/react-native-google-analytics-bridge/wiki/Solution-for-Android-build-failure-issues

thank you so much bro

thanks!

this is magic, you're the best

If we want to use a higher version, how can I do, please ?

I had same issue, after trying lots of things, this fixed this issue for me:

  1. added googlePlayServicesVersion=12.0.1 to gradle.properties (I guess it's unnecessary)
  2. added following to android/build.gradle:
 allprojects {
    repositories {
    //start here
    configurations.all {
 resolutionStrategy.eachDependency { DependencyResolveDetails details ->
   def requested = details.requested
       if (requested.group == 'com.google.android.gms') {
          details.useVersion '12.0.1'
       }
       if (requested.group == 'com.google.firebase') {
          details.useVersion '12.0.1'
         }
       }
     }
    //end
     jcenter()
       maven {
         url "https://maven.google.com"
       }
     }
 }

I've found this in https://github.com/idehub/react-native-google-analytics-bridge/wiki/Solution-for-Android-build-failure-issues

Thank you very much! It works :)

Obrigado!

Thanks bro you saved me

@sijad you save me!! Thanks!!!

Thank u so much bro, you have saved my life

Thank you very much. you rule!

Worked for me Thanks!

Still working in 2020, thank you!

thank you so much its works for me

Thank you very much, working for me in Feb 2021.

Was this page helpful?
0 / 5 - 0 ratings