Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;

后端 未结 7 1306
萌比男神i
萌比男神i 2021-02-13 14:12

I got this error when we run apk file of our application. In build.gradle we set multidex and compile multidex is existed in Gradle file . We changed the version of

7条回答
  •  南方客
    南方客 (楼主)
    2021-02-13 14:54

    I was having this issue when i enabled proguard, when i'm disabling it I don't get the crash. I fixed it by adding following dependencies in my app level gradle. I have used FCM, Firebase Analytics and google location in my app. So I had to add the following, if u r not using anything then skip it.

    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.firebase:firebase-messaging:20.2.0'
    implementation 'com.google.firebase:firebase-analytics:17.4.3'
    

    Also add the following in your proguard rules file.

    -dontshrink
    -dontoptimize
    -dontwarn
    -dontpreverify
    

提交回复
热议问题