Error:Execution failed for task ':app:processDebugGoogleServices'. > Please fix the version conflict

后端 未结 13 2535
生来不讨喜
生来不讨喜 2021-02-19 01:26

After updating my google play services to rev 28 i\'m getting this error. Im not sure why this is happening as it was working fine before.

here is my build.gradl

相关标签:
13条回答
  • 2021-02-19 02:08

    If you are only using play-services-analytics: delete this

    compile 'com.google.android.gms:play-services:8.3.0'
    

    The entire library is heavy. And now you can take the part that you need. Analitycs, gcm etc. So you're actually taking twice Analytics

    0 讨论(0)
  • 2021-02-19 02:08

    try this

    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
        classpath 'com.google.gms:google-services:2.0.0-alpha3'
    }
    
    0 讨论(0)
  • 2021-02-19 02:09

    Use these dependencies for the project build.gradle

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'com.google.gms:google-services:3.0.0'
    }
    

    and put this at the end of the app-level build.gradle file (after the dependencies). For some reason I don't understand if you put it at the beginning it will cause problems, make sure you place it at the end.

    apply plugin: 'com.google.gms.google-services'
    
    0 讨论(0)
  • 2021-02-19 02:12

    Current version is 2.0.0-beta6...move

    apply plugin: 'com.google.gms.google-services'
    

    from the top to the bottom after dependencies as suggested though, I added it to the bottom not realizing it was already at the top. Having it twice by accident annoyed me.

    0 讨论(0)
  • 2021-02-19 02:15

    You have to Import the google-services.json physically where your project resides eg:C:\Users\User\Desktop\yourproject\

    put your google-services.json here in app folder of yourprojects C:\Users\User\Desktop\yourproject\app <----------in this

    0 讨论(0)
  • 2021-02-19 02:18

    you need to add this

    dependencies {
            compile 'com.google.android.gms:play-services:9.6.1'
    }
    

    and remove this

    apply plugin: 'com.google.gms.google-services'
    
    0 讨论(0)
提交回复
热议问题