java.lang.NoClassDefFoundError: Failed resolution of: Lcom/Google/Android/gms/common/API/API$zzf; [duplicate]
Asked Answered
O

5

8
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.

Ophthalmoscopy answered 29/5, 2018 at 9:8 Comment(1)
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.rewardchat.benefitomessenger-2/base.apk"],nativeLibraryDirectories=[/data/app/com.rewardchat.benefitomessenger-2/lib/arm64, /system/lib64, /vendor/lib64]]Ophthalmoscopy
D
25

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'
Donalt answered 2/9, 2018 at 13:14 Comment(2)
Solved it for me!Ines
@Ines I am glad it helped you.Donalt
A
1

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.

Appetence answered 8/7, 2018 at 20:9 Comment(0)
U
1
implementation 'com.google.android.gms:play-services-auth:16.0.0'
Underfoot answered 4/5, 2020 at 12:27 Comment(0)
D
0

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"
       }
     }
 }
Donata answered 8/1, 2019 at 18:11 Comment(0)
A
-4

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

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

and sync gradle.

Autoplasty answered 22/8, 2018 at 7:8 Comment(1)
I can't see why a third party dependencies solves this.Ines

© 2022 - 2024 — McMap. All rights reserved.