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

前端 未结 15 1424
清歌不尽
清歌不尽 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:03

    Maybe it related to new release of Google Play services 12.0.0(released at March 20, 2018) I've resolved it fixing dependencies: Add config in android/build.gradle

    allprojects {
    repositories {
        ...
        configurations.all {
            resolutionStrategy {
                // Add force (11.0.0 is version you want to use)
                 force 'com.google.firebase:firebase-core:11.0.0'
                force 'com.google.firebase:firebase-crash:11.0.0'
                force 'com.google.firebase:firebase-analytics:11.0.0'
                force 'com.google.firebase:firebase-messaging:11.0.0'
                force 'com.google.android.gms:play-services-base:11.0.0'
                force 'com.google.android.gms:play-services-maps:11.0.0'
                force 'com.google.android.gms:play-services-wallet:11.0.0'
            }
        }
    }
    }
    

    Set of dependencies are from your android/app/build.gradle

提交回复
热议问题