I have this error with android studio Facebook Account Kit
Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
Detail Log
07-25 16:23:41.683 20088-20088/com.nazir.shopping E/AndroidRuntime:
FATAL EXCEPTION: main
Process: com.nazir.shopping, PID: 20088
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.facebook.accountkit.ui.AccountKitActivity.onCreate(AccountKitActivity.java:281)
at android.app.Activity.performCreate(Activity.java:7117)
at android.app.Activity.performCreate(Activity.java:7108)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1262)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2867)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3027)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:101)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:73)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1786)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6656)
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:823)
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.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/base.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_dependencies_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_resources_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_0_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_1_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_2_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_3_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_4_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_5_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_6_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_7_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_8_apk.apk”,
zip file
“/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_9_apk.apk”],nativeLibraryDirectories=[/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/base.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_dependencies_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_resources_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_0_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_1_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_2_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_3_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_4_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_5_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_6_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_7_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_8_apk.apk!/lib/x86,
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_slice_9_apk.apk!/lib/x86,
/system/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)
… 17 more
Suppressed: java.io.IOException: No original dex files found for dex location
/data/app/com.nazir.shopping-VZh5unWKQWN7d8SWHtKjbw==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:356)
at dalvik.system.DexFile.(DexFile.java:103)
at dalvik.system.DexFile.(DexFile.java:77)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:72)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:38)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:713)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:747)
at android.app.LoadedApk.getResources(LoadedApk.java:969)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2298)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5754)
at android.app.ActivityThread.access$1100(ActivityThread.java:193)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623)
… 6 more
2
Answers
This is happen when we try to authenticate user with some authenticate service like
AccountKit
FirebaseAuth
and those service depends onplay-services-auth
So, Addimplementation 'com.google.android.gms:play-services-auth:16.0.0'
add this in dependencies.
Just update so it works.