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

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

    1. Go to project.properties (in your platform folder)

    2. I was using just google analytics in my "project.properties" and had to add " 11.+" to the end of the version and that worked for me. Not sure if that's long term fix but it did the trick.

    cordova.system.library.2=com.google.android.gms:play-services-analytics:11.+
    
    0 讨论(0)
  • 2020-12-09 16:28

    Things i had to do to get the build to succeed on my Ionic3 App:

    • Add Plugin cordova-android-play-services-gradle-release
    • Remove and re-add the android platform
    • 11.+ in platform/android/project.properties file for libraries ( Especially if you're using firebase )
    • 11.+ for dependencies in platforms/android/cordova-plugin-firebase/-build.gradle
    • The above changes in platforms/android/build.gradle

    This might be the worst possible way to get things work, but kinda saved my life. Hope this helps someone!

    0 讨论(0)
  • 2020-12-09 16:29

    It works for me.

    node_modules/react-native-camera/android/build.gradle:
    dependencies {
        compile 'com.facebook.react:react-native:+'
        compile 'com.google.android.gms:play-services-gcm:11.8.0' // update by me on 
        20180321
    }
    
    0 讨论(0)
提交回复
热议问题