java.lang.NoClassDefFoundError: Failed resolution of: Lcom/Google/Android/gms/common/API/API$zzf;

时光毁灭记忆、已成空白 提交于 2019-12-07 02:07:22

问题


java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;

I am getting above error at run time.

I set multiDexEnabled true, but I'm still getting the error.

I am not able to find reason behind it. There is no correct solution for this question.


回答1:


I have also faced this issue while adding firebase auth in my project and issue was I have not added google auth as dependency in build.gradle. Adding below dependencies solved the problem

implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.3'



回答2:


I had this error due to dependency conflicts in Firebase. In particular, dependencies of the module Auth. In this case, updating the dependencies should solve the problem.




回答3:


try to add like this in the project gradle file like this

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"
       }
     }
 }



回答4:


You need to add the following to your gradle file dependencies:

compile 'com.applozic.communication.uiwidget:mobicomkitui:5.8.4'

and sync gradle.



来源:https://stackoverflow.com/questions/50580460/java-lang-noclassdeffounderror-failed-resolution-of-lcom-google-android-gms-co

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