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

后端 未结 7 1300
萌比男神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条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 15:15

    I fixed this issue. Please follow below code. Added following to android/build.gradle

    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"
           }
         }
     }
    

提交回复
热议问题