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

Amar Giram picture Amar Giram · May 29, 2018 · Viewed 10.7k times · Source
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.

Answer

Ankit picture Ankit · Sep 2, 2018

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'