Error: Could not find com.google.gms:google-services:1.0. when adding google service plugin in build.gradle in android studio

前端 未结 20 944
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 04:12

I am integrating OAuth login for Google+ on my android application, following the tutorial.

According to the tutorial, I should add the Google Service plugin by addi

相关标签:
20条回答
  • 2020-12-03 04:46

    I was trying to setup firebase for my android app when I faced this problem. Following screenshot should clarify things -

    Couple of things I would like to point out - 1. Once you

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

    This line should be at the bottom of the app level gradle file. Not sure why but putting at the top did not workout for me.

    0 讨论(0)
  • 2020-12-03 04:47

    We have to look for the last version in my case was:

    dependencies {    
        classpath 'com.google.gms:google-services:1.4.0-beta3'
    }
    

    Here you can find a list of the versions.

    0 讨论(0)
  • 2020-12-03 04:48

    I think you forgotten gradle's project level,

    From developers page:

    Add the dependency to your project-level build.gradle
    classpath 'com.google.gms:google-services:1.5.0-beta2'

    Add the plugin to your app-level build.gradle:
    apply plugin: 'com.google.gms.google-services'

    0 讨论(0)
  • 2020-12-03 04:50

    You maybe miss this step

    Copy the google-services.json file you just downloaded into the app/ or mobile/ directory of your Android Studio project. Open the Android Studio Terminal pane: $ move path-to-download/google-services.json app/

    Have fun.

    0 讨论(0)
  • Google now released the plugin v1.3.0

    I was able to solve it using this:

    classpath 'com.google.gms:google-services:1.3.0'

    0 讨论(0)
  • 2020-12-03 04:52

    You need to check the current version as in the link below says, by now:

    classpath 'com.google.gms:google-services:1.3.0-beta4'
    

    Check this answer:

    Update gradle version

    0 讨论(0)
提交回复
热议问题