Error: more than one library with package name com.google.android.gms.license

前端 未结 15 1562
清歌不尽
清歌不尽 2020-12-09 15:59

When I try to run the command ionic cordova build android out error as title above. Then I try to remove one of the gms, when I build again the del

15条回答
  •  死守一世寂寞
    2020-12-09 16:12

    Only this worked for me in build.gradle:

    allprojects {
        repositories {
            ...
            configurations.all {
                resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                    def requested = details.requested
                    if (requested.group == 'com.google.android.gms') {
                        details.useVersion '11.8.0'
                    }
                    if (requested.group == 'com.google.firebase') {
                        details.useVersion '11.8.0'
                    }
                }
            }
        }
    }
    

    https://github.com/evollu/react-native-fcm/issues/857#issuecomment-375243825

提交回复
热议问题