This question already has answers here:
NoClassDefFoundError - Eclipse and Android
(27个答案)
6个月前关闭。
我在运行时遇到了以上错误。
我将multiDexEnabled设置为true,但是仍然出现错误。
我找不到背后的原因。没有正确的解决方案
题。
(27个答案)
6个月前关闭。
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
我在运行时遇到了以上错误。
我将multiDexEnabled设置为true,但是仍然出现错误。
我找不到背后的原因。没有正确的解决方案
题。
最佳答案
我在项目中添加Firebase身份验证时也遇到了这个问题,问题是我没有在build.gradle中添加google auth作为依赖项。添加以下依赖项解决了问题
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.3'